0

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

5
Contributors
6
Replies
7
Views
9 Years
Discussion Span
Last Post by jbennet
0

Um, you need root permissions to be able to edit the shadow file, otherwise its purpose would be defeated.

0

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.

0

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
0

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>

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.