User logs in but cannot access root (forgot passwd) and gets the message"Sorry, user ______ is not allowed to execute '/bin/bash' as root on localhost" when using sudo to, say, change sudoers list.
Any options since there exists no failsafe I am aware of?
topic title: No root passwd & not in sudoers list
-
Posts: 54
- Joined: 30 May 2010
-
Posts: 2,238
- Joined: 16 Dec 2007
#2
I don't think sudo is set up by default except for a few key commands. When you installed you should have set up a root account. You access the root account by type"su" at the command line, and entering the root password. Your normal user password won't work.
Someone who knows the internals better might be able to tell you how to reset the password from a boot disk, but I don't know how to do that.
Someone who knows the internals better might be able to tell you how to reset the password from a boot disk, but I don't know how to do that.
-
anticapitalista
Posts: 5,955
- Site Admin
- Joined: 11 Sep 2007
#3
Try this at grub menu.
1. Append ‘init=/bin/bash’ at the end of line (no ' ')
2. Press Enter
3. Type mount -n -o remount,rw / (at prompt)
4. passwd
5. Follow steps to give yourself a new root password
5. reboot
1. Append ‘init=/bin/bash’ at the end of line (no ' ')
2. Press Enter
3. Type mount -n -o remount,rw / (at prompt)
4. passwd
5. Follow steps to give yourself a new root password
5. reboot
-
Posts: 2,238
- Joined: 16 Dec 2007
#4
I just googled around. you can try this procedure.
1. boot from livecd
2. mount the root partition for your installed system from the livecd command line.
3. go root (su at command line) and enter livecd root password (root in this case).
4. use chroot /mnt/hda1/ at the command line (use your own mount point in the command, this was mine).
5. you will get a new root prompt.
6. type passwd and enter the new root password when asked.
7. type exit, you will now be back in the livecd root environment.
8. reboot and try your new root password. you cannot log in as root from the slim login manager, you will need to"su" from the terminal command line once you are booted.
Just tried this on my system, and seems to work fine.
1. boot from livecd
2. mount the root partition for your installed system from the livecd command line.
3. go root (su at command line) and enter livecd root password (root in this case).
4. use chroot /mnt/hda1/ at the command line (use your own mount point in the command, this was mine).
5. you will get a new root prompt.
6. type passwd and enter the new root password when asked.
7. type exit, you will now be back in the livecd root environment.
8. reboot and try your new root password. you cannot log in as root from the slim login manager, you will need to"su" from the terminal command line once you are booted.
Just tried this on my system, and seems to work fine.
-
Posts: 2,238
dolphin_oracle - Joined: 16 Dec 2007
#5
ah, I see anti has a more direct procedure. great!
-
Posts: 54
- Joined: 30 May 2010
#6
Please tell me how to get to the GRUB menu (menu.lst?). If I cannot logon as root, how am I to edit it? Also, to which line are you referring when you say EOL?
I have Super Grub Disk 0.9673 but have not figured out how to make use of it very well. (This is from my initial shotgun approach to Linux). Perhaps it can prove useful in this instance?
Since I received two replies, I will atempt to solve the first one first!anticapitalista wrote:Try this at grub menu.
1. Append ‘init=/bin/bash’ at the end of line (no ' ')
2. Press Enter
3. Type mount -n -o remount,rw / (at prompt)
4. passwd
5. Follow steps to give yourself a new root password
5. reboot
Please tell me how to get to the GRUB menu (menu.lst?). If I cannot logon as root, how am I to edit it? Also, to which line are you referring when you say EOL?
I have Super Grub Disk 0.9673 but have not figured out how to make use of it very well. (This is from my initial shotgun approach to Linux). Perhaps it can prove useful in this instance?
-
anticapitalista
Posts: 5,955
- Site Admin
- Joined: 11 Sep 2007
#7
Reboot and do it at boot menu. Just type init=/bin/bash and press enter
- Posts: 54 SaminBare
- Joined: 30 May 2010
#8
I did as you said, anticapitalista, and after <mount -n -o remount,rw> a help type menu appeared (not listing the -n switch); I went ahead with the <passwd> command, which returned
Enter new UNIX password:
then
passwd: Authentication token manipulation error
passwd: password unchanged
Prompt said"root@xxxx" but would not behave as root, e.g. <init 6> did not a thing.
Enter new UNIX password:
then
passwd: Authentication token manipulation error
passwd: password unchanged
Prompt said"root@xxxx" but would not behave as root, e.g. <init 6> did not a thing.
-
anticapitalista
Posts: 5,955
- Site Admin
- Joined: 11 Sep 2007
#9
You need (note the / at the end)
mount -n -o remount,rw /
mount -n -o remount,rw /
-
Posts: 54
- Joined: 30 May 2010
#10
Cool! Finally got 'er working. Thanks! Mark this SOLVED.
Now, I need a functional sources.list that will include the likes of
libdvdcss, vlc &
the GIMP (or a good substitute),
please . My current list has been corrupted by mistakes in the past including sidux repositories,
missing gpg keys, and debian sources that do nothing. Should I post this separately?
NOTE: the last time I tried smxi, I had to reload the OS because a solution to the ensuing problems was beyond my expertise. I obviously did something incorrectly after the wifi stuff returned errors (I didn't need that in the first place)
Now, I need a functional sources.list that will include the likes of
libdvdcss, vlc &
the GIMP (or a good substitute),
please . My current list has been corrupted by mistakes in the past including sidux repositories,
missing gpg keys, and debian sources that do nothing. Should I post this separately?
NOTE: the last time I tried smxi, I had to reload the OS because a solution to the ensuing problems was beyond my expertise. I obviously did something incorrectly after the wifi stuff returned errors (I didn't need that in the first place)
-
Posts: 1,228
- Joined: 15 Jun 2008
#11
Here's another easy way to reset the user password:
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://forums.debian.net/viewtopic.php?p=313539#p313539"
linktext was:"http://forums.debian.net/viewtopic.php?p=313539#p313539"
====================================
As for /etc/apt/sources.list, here's mine in a Squeeze install (the first lines are mirrors in Brazil, you can get a list for your country at
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.debian.org/mirror/list"
linktext was:"http://www.debian.org/mirror/list"
====================================
, put two of them - leaving one commented out - so you have an alternative in case one of them is slow or something like that)
You should have what you need. The Google testing repo even has Picasa and if you want GIMP to paint you can try mypaint (from regular Debian). As you see it's for"squeeze" but you can change that for"testing" if you want to keep rolling.
Also the last line is the sidux mirror in Brazil, you get a full list of them at
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://sidux.com/index.php?module=Content&func=view&pid=2"
linktext was:"http://sidux.com/index.php?module=Conte ... view&pid=2"
====================================
You can copy from the antiX live-CD too if you like.
For the sidux keyring, enable its repo, apt-get update (ignore the missing keyring) and then
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://forums.debian.net/viewtopic.php?p=313539#p313539"
linktext was:"http://forums.debian.net/viewtopic.php?p=313539#p313539"
====================================
As for /etc/apt/sources.list, here's mine in a Squeeze install (the first lines are mirrors in Brazil, you can get a list for your country at
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.debian.org/mirror/list"
linktext was:"http://www.debian.org/mirror/list"
====================================
, put two of them - leaving one commented out - so you have an alternative in case one of them is slow or something like that)
Code: Select all
#############################################################
################### OFFICIAL DEBIAN REPOS ###################
#############################################################
###### Debian Main Repos
#deb http://ftp.br.debian.org/debian/ squeeze main contrib non-free
deb http://sft.if.usp.br/debian/ squeeze main contrib non-free
#deb-src http://sft.if.usp.br/debian/ squeeze main contrib non-free
###### Debian Security Update Repos
deb http://security.debian.org/ squeeze/updates main contrib non-free
#deb-src http://security.debian.org/ squeeze/updates main contrib non-free
##############################################################
##################### UNOFFICIAL REPOS ######################
##############################################################
###### 3rd Party Binary Repos
#### Debian Multimedia - http://www.debian-multimedia.org/
## Run this command: apt-get update && apt-get install debian-multimedia-keyring && apt-get update
deb http://www.debian-multimedia.org/ squeeze main non-free
#### E17 - http://enlightenment.org
## Run this command: wget -q http://packages.enlightenment.org/repo.key -O- | apt-key add -
deb http://packages.enlightenment.org/debian squeeze main extras
#### Google Linux Software Repositories - http://www.google.com
## Run this command: wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && apt-get update
deb http://dl.google.com/linux/deb/ stable non-free main
#### Google Linux Software Repositories (testing) - http://www.google.com
## Run this command: wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && apt-get update
deb http://dl.google.com/linux/deb/ testing non-free
#### VirtualBox - http://www.virtualbox.org
## Run this command: wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | apt-key add -
deb http://download.virtualbox.org/virtualbox/debian lenny non-free
#### sidux
#deb http://sidux.c3sl.ufpr.br/debian/ sid main
Also the last line is the sidux mirror in Brazil, you get a full list of them at
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://sidux.com/index.php?module=Content&func=view&pid=2"
linktext was:"http://sidux.com/index.php?module=Conte ... view&pid=2"
====================================
You can copy from the antiX live-CD too if you like.
For the sidux keyring, enable its repo, apt-get update (ignore the missing keyring) and then
Code: Select all
apt-get install sidux-keyring
-
anticapitalista
Posts: 5,955
- Site Admin
- Joined: 11 Sep 2007
#12
This is the current sources.list for antiX-M8.5-upgrade (USA)
Code: Select all
# See sources.list(5) for more information
# Note:If you want maximum stability, only use the stable repos.
# MEPIS 8 series.
# Uncomment all MEPIS repos shown here to install headers and linux-kbuild
# from MEPIS repo for MEPIS kernel. Then comment back once installed.
#deb ftp://ftp.mepis.com/mepis/ mepis-8.5 main
#deb http://fr1.mepis-deb.org/mepis/ mepis-8.0 main
#deb http://www.mirrorservice.org/sites/ftp.mepis.org/mepis/ mepis-8.0 main
# Debian Testing. Default for antiX.
# Testing enabled for 'rolling' release.
deb http://ftp.us.debian.org/debian/ testing main contrib non-free
deb http://security.debian.org/ testing/updates main contrib non-free
#deb-src http://ftp.de.debian.org/debian/ testing main contrib non-free
# Debian Stable.
# This will 'soon' be"Squeeze". Use for maximum stability INSTEAD of
# the 'rolling' TESTING release concept.
# So, for max stability, UNCOMMENT the next two 'deb' lines and
# COMMENT-OUT the corresponding 'deb' lines in TESTING above.
#deb http://ftp.gr.debian.org/debian/ squeeze main contrib non-free
#deb http://security.debian.org/ squeeze/updates main contrib non-free
#deb-src http://ftp.de.debian.org/debian/ squeeze main contrib non-free
# Multimedia Stable and Testing
deb http://www.debian-multimedia.org testing main non-free
#deb http://www.debian-multimedia.org stable main non-free
# Goggles music manager
deb http://apt.progchild.de stable main
# opera
#deb http://deb.opera.com/opera/ lenny non-free
# virtualbox
#deb http://download.virtualbox.org/virtualbox/debian lenny non-free
# liquorix kernels
deb http://liquorix.net/debian/ sid main
deb http://ftp.belnet.be/mirror/liquorix.net/debian sid main
# bleeding edge kernel. If used comment out the 2 entries above.
#deb http://liquorix.net/debian/ sid main future
###### Debian Unstable/Sid##########
###### Use at your own risk! ########
#deb http://ftp.us.debian.org/debian/ unstable main contrib non-free
#deb http://www.debian-multimedia.org unstable main non-free
-
Posts: 54
- Joined: 30 May 2010
#13
SOLVED & More!
Thank you, gentlemen, for outstanding assistance! anticapitalista, dolphin_oracle & secipolla -- my hat's off.
May you all and the Linux distro antiX continue indefinitely! I will continue to recommend it every chance I get (and I see it is gaining recognition in other US fora. Very good.)
Thank you, gentlemen, for outstanding assistance! anticapitalista, dolphin_oracle & secipolla -- my hat's off.
May you all and the Linux distro antiX continue indefinitely! I will continue to recommend it every chance I get (and I see it is gaining recognition in other US fora. Very good.)
-
Posts: 1,228
- Joined: 15 Jun 2008
You're welcome SaminBare.
There's an automatic sources.list generator for Debian at
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://debgen.simplylinux.ch/"
linktext was:"http://debgen.simplylinux.ch/"
====================================
and you'll see that I based mine on it. A few things weren't correct (like the Google repo or the VirtualBox keyring that is a new one now) but it has links to the homepages of the repos and so one can check the updated info from there and correct whatever needs to be corrected.
Also, are you being able to 'apt-get update' with no errors now? Because if you still have some broken package you can open Synaptic package manager and it will pop up an alert for it, then you can mark it for 'complete removal' and click Apply. Then you can open the state (or status) filter on Synaptic's bottom-left column and select 'auto-removable' packages (you will have that only if you have removed something before that has left unneeded dependencies) and completely remove them as well. This last step can be done on a terminal with the command 'apt-get autoremove --purge', but only if you don't have Synaptic open (otherwise it blocks apt-get).
Then just 'apt-get update' to update the package list (or click Reload in Synaptic).
There's an automatic sources.list generator for Debian at
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://debgen.simplylinux.ch/"
linktext was:"http://debgen.simplylinux.ch/"
====================================
and you'll see that I based mine on it. A few things weren't correct (like the Google repo or the VirtualBox keyring that is a new one now) but it has links to the homepages of the repos and so one can check the updated info from there and correct whatever needs to be corrected.
Also, are you being able to 'apt-get update' with no errors now? Because if you still have some broken package you can open Synaptic package manager and it will pop up an alert for it, then you can mark it for 'complete removal' and click Apply. Then you can open the state (or status) filter on Synaptic's bottom-left column and select 'auto-removable' packages (you will have that only if you have removed something before that has left unneeded dependencies) and completely remove them as well. This last step can be done on a terminal with the command 'apt-get autoremove --purge', but only if you don't have Synaptic open (otherwise it blocks apt-get).
Then just 'apt-get update' to update the package list (or click Reload in Synaptic).
-
Posts: 54
- Joined: 30 May 2010
#15
Errors were returned for sidux-keyring (could not find)
public key not available for virtualbox and google;
apt-get build-dep vlc && apt-get build-dep perl-tk
both returned message indicating necessity to 'add sourc URIs to list'
Will check out synaptic as you indicated.
Have to go to dinner now, though.
Later, friend.
public key not available for virtualbox and google;
apt-get build-dep vlc && apt-get build-dep perl-tk
both returned message indicating necessity to 'add sourc URIs to list'
Will check out synaptic as you indicated.
Have to go to dinner now, though.
Later, friend.