-   Linux - Security (
-   -   passwd permissions (

victorp 01-02-2013 02:33 PM

passwd permissions

After installing samba4 on Ubuntu 12.10 i got an error. After restart i was not able to login.
Thus, booted in recovery mode, root shell and tried to change passwd <username>
But the command does nothing, doesn't ask for new password for the user. Simply returns.
Now, right after the command i did 'echo $?'
I see exit code '1'. Permissions denied.
But I am root!
Please help.


jonesr 01-02-2013 06:19 PM

Recovery mode assumes your system may really be broken, so it mounts the root file system in read-only mode to avoid making matters any worse. Try your password reset again after remounting the root file system in read-write mode with

mount -o remount,rw /

victorp 01-03-2013 03:54 AM

passwd permission problem
1 Attachment(s)
Thanks, jonesr

Yes, i know about ro in recovery mode.
I remounted as rw of course before doing anything.
I suppose that installing samba4 broke something.
After remount i can edit the /etc/passwd and /etc/shadow files with vim.
I even tried to strace passwd <username>, its attached.
But i can't figure out from it where it faces with permissions problem.

linosaurusroot 01-03-2013 05:22 AM

Is nsswitch.conf using "files" as the first passwd data source?

linosaurusroot 01-03-2013 05:25 AM

Are any passwd/shadow format errors shown by pwck ?

victorp 01-04-2013 03:29 PM

Thanks, linosaurusroot

I discovered a backup of nsswitch.conf
Right after i restored the backup, it worked.

Thanks for the tipp.

All times are GMT -5. The time now is 05:34 PM.