LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   root account expired (https://www.linuxquestions.org/questions/linux-newbie-8/root-account-expired-932319/)

kennmunene 03-02-2012 05:41 AM

root account expired
 
Hello, I have two accounts in my computer james and john. james is the only administrative account and I set it to expire. Now I am unable to login using james because it has expired. John is not in the sudoers list so I can not use it to reset James. I am unable to login using root either, I think it used the same password as james. Kindly help.

acid_kewpie 03-02-2012 08:56 AM

reboot the machine, on the boot screen, hit e to edit your default options, and add a 1 to the command line. then press b to boot. This will put you in as root, and let you set the root password as you wish.

kennmunene 03-03-2012 01:25 PM

Where
 
Thanks for the help, where do I add a 1?
please include a short example.

yancek 03-03-2012 02:55 PM

You don't indicate which distribution of Linux you are using. If it's Ubuntu or one of its derivatives or something using Grub2, you can get detailed information at the link below. You would hit the 'e' key when you see the boot menu. The one you want to edit should be highlighted. Then follow the instructions at the link. You would want to use the arrows on your keyboard to go down to the linux line and the right arrow key to go to the end of the line, leave a space and enter the number 1.

https://help.ubuntu.com/community/Gr...nu_During_Boot

If you are not using Grub2, post back with the name of the distribution.

acid_kewpie 03-03-2012 04:56 PM

on to the line that looks vaguely like this - "kernel /boot/bzImage.2.4.18-19.8.0.19mar2003 ro root=LABEL=/ hdd=ide-scsi"

kennmunene 03-05-2012 06:00 AM

Thanks guys for your help so far. I have found the line and added a space then 1. however when i press ctrl-X to boot with the changes I get a message
"rc-sysinit start/running process 2104
*asking all remaining processes to terminate
init: upstart-udev-bridge main process ended, respawning
init: rsyslog main process ended, respawning"
and I go to the recovery menu - with options
resume normal boot
.
.
.
Drop to root shell prompt.

When i choose drop to root shell prompt I get "login incorrect".
am using grub version 1.98+20100804-5ubuntu3

kennmunene 03-05-2012 06:42 AM

I finally got it to work
1. On the grub boot options menu press 'e'
2. edit the command line options in the line containing vmlinuz at the end of the line add a space then the word 'single' without the quotes then a space then /bin/bash
3. press cttrl-x to boot with the changes
remember the settings are not permanent so if your system for any reason has to reboot, remember to edit the settings again. (mine keeps on checking disks).
4. you should now have access to a root shell prompt
root@(none):/#
5. Feel happy
6. use the chage command to reset the account
chage -E -1 useraccount
7. if you get an error can not lock /etc/passwd
mount -o remount, rw /
8.take a few minutes in your life assist others.

Thanks again guys for all your help.


All times are GMT -5. The time now is 07:08 PM.