1820619 Members
1884 Online
109626 Solutions
New Discussion юеВ

Re: change passwd

 
file system
Frequent Advisor

change passwd

Hi all.
I have problem to change passwd for user.
I've tried to change passwd for user.
when it runs, some error logged like this.

#[root@mail root]# passwd affis
Changing password for user affis
passwd: Authentication token manipulation error

Jun 14 13:32:36 mail sshd[2294]: error: Could not get shadow information for affis
Jun 14 13:32:36 mail sshd[2294]: Failed password for affis from 211.237.50.12 port 35070 ssh2

what might be the problem?
send your opinion. as fast as possible.
thanks.
6 REPLIES 6
debian111
Regular Advisor

Re: change passwd

Hi,

as I can see you are trying to change password for user affis over ssh connection?
I think should check is there some line in /etc/shadow connected with affin user ( it must be ) , and of course check /etc/ssh/sshd_config to see is there some parameter which restrict password changing over ssh connection.


Best wishes


Sergejs Svitnevs
Honored Contributor

Re: change passwd

Please check the permissions of /etc/passwd and /usr/bin/passwd files. The owner and group should be set to root.

Regards
file system
Frequent Advisor

Re: change passwd

As you notice to me that, I checked the owner, group of /etc/passwd /usr/bin/passwd.
it works fine. boht file has owner root, group root permission.
and checked the /etc/ssh/sshd_config file.

can you point out which options in the sshd_config file to block to change passwd via connecting ssh.

================
Here is additional problem.

I can't add user affis.
when i run command, it prints out like this.
[root@mail root]# useradd affis
useradd: user affis exists

so I switched user from root to affis
but it switched the user affis. though it has no affis accounts in /etc/passwd /etc/shadow file.
[root@mail root]# su - affis
sh-2.05$ id
uid=42000(affis) gid=65535 groups=65535
sh-2.05$
I think some sort of complexed problem is in it.

Steve_160
Frequent Advisor

Re: change passwd

I'm not sure if you've checked this or not: There IS an entry in /etc/shadow for this user, isn't there? If not, you could simply copy your (or root's) entry and change the user name. Then you should be able to change the password as root, or log in as the user (using the password for whoever you copied) and use passwd to change the password.
#@%!! Windows!
Steve_160
Frequent Advisor

Re: change passwd

I read your second post more closely. If the user was not listed in /etc/shadow to start with, that was your problem. "Passwd" will not create a password where none exists.

If the user is not listed in /etc/passwd then I would edit that file to create the account manually. Here is an example:

steve:x:500:100:Steve:/home/steve:/bin/bash

The fields are:
1: Username
2: Always "x" (I suppose this field was once used for the password)
3: Userid: A unique number, but similar to other users' id's.
4: Group id: Same as the other users.
5: User's real Name
6: User's home directory
7: Login shell.
#@%!! Windows!
Bill Thorsteinson
Honored Contributor

Re: change passwd

If the user is not listed in /etc/passwd,
then you are using LDAP, NIS+, or some
other system for authentication of that user.
They may not have appropriate permissions
to change the password from that server.

If they are listed there, then add an entry
to /etc/shadow if it is missing.
passwd should be setuid.