The officially official Devuan Forum!

You are not logged in.

#1 2018-05-29 08:44:31

gnufan
Member
Registered: 2018-05-29
Posts: 1  

2 problems,revert system change and change password for user

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

#2 2018-05-29 09:39:46

msi
Member
Registered: 2017-02-04
Posts: 143  

Re: 2 problems,revert system change and change password for user

gnufan wrote:

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.

gnufan wrote:

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.

gnufan wrote:

Thanks for working on this great distro, I have just changed from Ubuntu and I think it is great. :-)

Welcome to Devuan!

Offline

#3 2018-05-29 09:46:38

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,251  

Re: 2 problems,revert system change and change password for user

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 smile

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

Board footer