Kafriki wrote:
ok here is a user with full details: (this is in plain text, hope it's more readable)

cat.cat:$2a$07$aYgatzjxAULHQmmZkjmvteGEaO8Ie8geMoUfhl7AAzKi.WeRhuoA6:10006:20::0:0:Pussy Cat:/smbhome/student_homedirs/cat.cat:/bin/ksh

Ok, so you're a cat lover.

Anyway, that dot in the username may be causing some problems. passwd(5) says:

The login name may be up to 31 characters long.  For compatibility with
legacy software, a login name should start with a letter and consist
solely of letters, numbers, dashes and underscores.  The login name must
never begin with a hyphen (`-'); also, it is strongly suggested that nei-
ther uppercase characters nor dots (`.') be part of the name, as this
tends to confuse mailers.  No field may contain a colon as this has been
used historically to separate the fields in the user database.

I successfully added the user "cat.cat" and changed the user's password with passwd(1) on my 4.1 system. I'm not sure what is going on in your system.

Try using vipw to replace the password with an "*" then try running passwd again.

Are you sure there isn't an empty line in master.passwd?

I appended an empty line to my master.passwd and ran passwd and I received the same exact error as you did. BTW, how many lines are in your master.passwd file (wc -l /etc/master.passwd) and what is the line number with the error reported by passwd?

Because vipw is working for you, try removing the invalid line, then run passwd for another account. This should test whether your passwd program is working properly. It is weird that vipw works, but passwd complains.



----- Original Message ----- From: Clint Pachl
To: Jumping Mouse
Cc: misc@openbsd.org
Sent: Tuesday, November 20, 2007 8:56 PM
Subject: Re: can't change password with passwd comand


Jumping Mouse wrote:
Hi Clint, Yes I am the one. as for changing the password this seems to happen to any user except for the root acount, I am able to use passwd to change the root account password. Here is line 24: (I removed the password and real usernmame) username::1000:0::0:0:username:/home/username:/bin/ksh

I was going to say, don't remove the username or password because the
problem could be embedded in either one of those fields. Anyway, check
to make sure that there is no whitespace adjacent to any colons.
 I
don't know if this matters but there is no ptmp file in the /etc directory
(no was there before I followed your earlier instructions)

Doesn't matter. Just wanted to make sure it wasn't causing any problems
when running passwd, which uses that file name as it's temp file.

Reply via email to