how is shadow file modified
how is the shadow file modified when its permissions are -r--------
i know that when passwd is executed the user is set to root priveleges by setuid(), but how does passwd modify the shadow file thank you |
root doesn't have to obey posix filesystem rights, it's happy to override them if that's what the code says. What it can't / won't, to my knowledge, get around is if the file is set to be immutable (chattr +i /etc/shadow). I guess it's set as not writable by default as it's never meant to be manually edited, but can be if you really need to.
|
how is shadow file written to
so if i login as root can i change the shadow file using vi or you meant kernel instead of rootwhich can modify the file
thank you |
yeah, you'll need a :w! to force a write, but it's easy enough in vi.
|
All times are GMT -5. The time now is 10:46 AM. |