Cannot reset root password

Reply

Join Date: Oct 2006
Posts: 102
Reputation: Don Gino is an unknown quantity at this point 
Solved Threads: 2
Don Gino's Avatar
Don Gino Don Gino is offline Offline
Junior Poster

Cannot reset root password

 
0
  #1
Jul 2nd, 2008
Hey,

I have been trying to reset the root password for a unix system. The shadow file has full rw-rw-rw permissions, however when I force write the save (in vi editor) it says it cannot do it because its a "Read-only filesystem". Is there another way around this?

Thanks
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,051
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 332
Team Colleague
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: Cannot reset root password

 
1
  #2
Jul 2nd, 2008
Um, you need root permissions to be able to edit the shadow file, otherwise its purpose would be defeated.
"Technological progress is like an axe in the hands of a pathological criminal."

All my posts may be freely redistributed under the terms of the MIT license.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 102
Reputation: Don Gino is an unknown quantity at this point 
Solved Threads: 2
Don Gino's Avatar
Don Gino Don Gino is offline Offline
Junior Poster

Re: Cannot reset root password

 
0
  #3
Jul 3rd, 2008
Sorry I didnt state it but I was root, I have no other accounts
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,051
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 332
Team Colleague
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: Cannot reset root password

 
1
  #4
Jul 3rd, 2008
Then how come you aren't using passwd to change the password?

I'm not really sure what you're trying to do here. If you're trying to reset the root password of a Linux system using another environment (eg. LiveCD), then you need to make sure you've not mounted the remote filesystem as readonly. Secondly, it's probably better to chroot into the system and use passwd to change it rather than messing with /etc/shadow.
Last edited by John A; Jul 3rd, 2008 at 6:17 am.
"Technological progress is like an axe in the hands of a pathological criminal."

All my posts may be freely redistributed under the terms of the MIT license.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 26
Reputation: vl4kn0 is an unknown quantity at this point 
Solved Threads: 4
vl4kn0's Avatar
vl4kn0 vl4kn0 is offline Offline
Light Poster

Re: Cannot reset root password

 
0
  #5
Jul 8th, 2008
You should reboot your system and in Grub or Lilo load kernel with parameter init=/bin/bash. Then you have root permissions but system will be for reading only. So you write command:
mount -o remount,rw /
. It remount your system for writing and you can run script passwd and change root password:
passwd root
Keep in mind that I'm not native english speaker....
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 7
Reputation: achadya is an unknown quantity at this point 
Solved Threads: 0
achadya achadya is offline Offline
Newbie Poster

Re: Cannot reset root password

 
0
  #6
Dec 6th, 2008
Hi
it has been a while since i used unix. look in your manual. there is a number sequence that needs to be set to open the user passwords for all users, rw-rw-rw will not work, it will require a root administrator login. do not allow this setting to remain as it will open your system up to anyone savvy enough to use telnet and uucp. also for security reasons disconnect all internet and modem connections while performing this operation. since it is using the redirection to the shadow file both access files need these changes. once again do not allow access while performing these operations.
good luck.
<snipped email / fake sig>
Last edited by jbennet; Dec 6th, 2008 at 7:17 am. Reason: <snipped email / fake sig> - consult the rules
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,246
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 540
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: Cannot reset root password

 
0
  #7
Dec 6th, 2008
just boot into single user mode?
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the *nix Software Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC