LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-02-2012, 05:41 AM   #1
kennmunene
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Rep: Reputation: Disabled
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.
 
Old 03-02-2012, 08:56 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,406

Rep: Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965
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.
 
Old 03-03-2012, 01:25 PM   #3
kennmunene
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Where

Thanks for the help, where do I add a 1?
please include a short example.
 
Old 03-03-2012, 02:55 PM   #4
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,880

Rep: Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773
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.
 
Old 03-03-2012, 04:56 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,406

Rep: Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965
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"
 
Old 03-05-2012, 06:00 AM   #6
kennmunene
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
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
 
Old 03-05-2012, 06:42 AM   #7
kennmunene
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Expired Root Account/Password for Solaris 8 linux_pioneer Solaris / OpenSolaris 12 09-23-2007 02:23 AM
root account expired The helpless one Linux - Newbie 4 03-11-2006 12:27 PM
root account expired TastyWheat Linux - Security 7 09-14-2004 08:47 AM
.... Can More Login - Account Expired (help!) Beuzekom Linux - Newbie 11 10-08-2003 10:45 AM
Root account expired, sort of.... rmohn Linux - Security 1 12-10-2002 10:32 AM


All times are GMT -5. The time now is 07:13 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration