943,704 Members | Top Members by Rank

Ad:
Jul 2nd, 2008
0

Cannot reset root password

Expand Post »
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
Similar Threads
Reputation Points: 16
Solved Threads: 2
Junior Poster
Don Gino is offline Offline
102 posts
since Oct 2006
Jul 2nd, 2008
1

Re: Cannot reset root password

Um, you need root permissions to be able to edit the shadow file, otherwise its purpose would be defeated.
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006
Jul 3rd, 2008
0

Re: Cannot reset root password

Sorry I didnt state it but I was root, I have no other accounts
Reputation Points: 16
Solved Threads: 2
Junior Poster
Don Gino is offline Offline
102 posts
since Oct 2006
Jul 3rd, 2008
1

Re: Cannot reset root password

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.
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006
Jul 8th, 2008
0

Re: Cannot reset root password

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
Reputation Points: 27
Solved Threads: 4
Light Poster
vl4kn0 is offline Offline
26 posts
since Mar 2008
Dec 6th, 2008
0

Re: Cannot reset root password

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
achadya is offline Offline
14 posts
since Aug 2008
Dec 6th, 2008
0

Re: Cannot reset root password

just boot into single user mode?
Moderator
Featured Poster
Reputation Points: 1764
Solved Threads: 574
Moderator
jbennet is offline Offline
16,501 posts
since Apr 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Linux Applications and Software Forum Timeline: apache: how to make my index function?
Next Thread in Linux Applications and Software Forum Timeline: changed from windows to linux...need help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC