You are not logged in.
Hi, I have a quick 2 problem that i cannot seem to solve. I am a bit of a noob so sorry in advance if questions are a bit easy.
I am running Devuan Jessie. I try to change the password for the user using the following command: sudo passwd USER , but was unable to change the password, i got an error, "authentication-token-manipulation-error". so I did some research and found that it may have something to do with the fact that certain file permissions were not allowing me write. I then ran the following commands, "mount -o remount,rw /" and then "chmod 640 /etc/shadow" but still got the same error.
So I have two questions, firstly how do I reset my user password ?
Secondly, how do I revert the following commands "mount -o remount,rw /" and then "chmod 640 /etc/shadow" so my system can return back to its original state ? which commands should I run
I know that the command "mount -o remount,rw /" dismounts the root partition and then mounts it again as read/write. Is this a safe state ? I am assuming not, so I would like to return to the original permissions for the root partition.
It has done this, with multiple USB sticks, but yesterday this unmount function was working fine.
Thanks for working on this great distro, I have just changed from Ubuntu and I think it is great. :-)
"
Last edited by gnufan (2018-05-29 09:04:38)
Offline
So I have two questions, firstly how do I reset my user password ?
Just run passwd – without sudo and a username. See man passwd for additional information.
Secondly, how do I revert the following commands "mount -o remount,rw /" and then "chmod 640 /etc/shadow" so my system can return back to its original state ?
1. As far as I can see, running chmod 640 on /etc/shadow doesn't change anything because the file already has those permission settings by default. Btw, fiddling with the permission settings of system files belonging to root is risky and should only be done if you know what you're doing.
2. As for the mount command, a reboot should set you back to normal, since that command doesn't change anything in /etc/fstab.
Thanks for working on this great distro, I have just changed from Ubuntu and I think it is great. :-)
Welcome to Devuan!
Offline
I would think the first problem is due to the PAM configuration, though I don't remember exactly. Please show /etc/pam.d/common-auth and /etc/pam.d/common-password; it might trigger my memory
EDIT: as I remember, when one of those files has the use_authtok option for the pam_unix.so module, then it's impossible for an su root user to change anyone's password. The solution would be to not have that option. See man pam_unix.
Offline