Um, you need root permissions to be able to edit the shadow file, otherwise its purpose would be defeated.
John A
Vampirical Lurker
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339
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.
John A
Vampirical Lurker
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339
just boot into single user mode?
jbennet
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,826
Solved Threads: 600