[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: creating password for a shadow file



Hi Daniel,
Here in my company I have proftp with other password file (/etc/passwd.ftp).
This file content:
user:<pass_encrytped>:IDU:IDG:<home>:<shell>

I did a script to add users in this file with htpasswd, but you can use
makepasswd. My script add the user in passwd.ftp, create the home and
set the correct permissions (IDU:IDG) to its.

If you would like its I send to you.

PS: My scritp is in portuguese from Brazil and sorry for my English.

Gilberto


Em Mon, 01 Dec 2003 08:59:37 +0100
LeVA <leva@az.isten.hu> escreveu:

> Hello!
> 
> I need to add users to a passwd/shadow file, but these files does not
> reside in /etc dir. Thus I can not use the adduser or useradd tool to
> add the users, because then they will be added to the /etc/passwd|shadow 
> file, and my passwd/shadow files are in another directory. These 
> passwd/shadow files are used by an ftp server. I have managed to create 
> a passwd file, and wrote the user name and uid, and homedir etc... by 
> hand. The shadow file's passwords must be encrytped with md5. So I used 
> the 'htpasswd' program to create a password for the user.  I typed:
> 
> htpasswd -m shadow.ftp user
> 
> The problem is that this program doesn't create a password like the
> adduser program used to create, and put to the /etc/shadow file. When I 
> try to login with 'user' via ftp (using the newly created shadow file),
> it says username and/or password was not accepted, so the password 
> generation didn't work.
> 
> 'htpasswd -bmn user password' output:
> 
> user:$apr1$DlJ9I...$E8VL0rjQKdl1pVgH2q10C.
> 
> 'adduser user' (with same password as above) output:
> 
> user:$1$NR.fOvEF$.hOr7l7msiIfz6sP4l0yS/
> 
> As you can see they don't match.
> So my question is, that is it possible to create passwords for a shadow 
> file with a command line tool? Is this htpasswd the right tool for this, 
> and I just can not use it? Or if this is not possible, then how can I 
> specify another destination shadow/passwd file for the adduser/useradd 
> program.
> 
> Thanks!
> 
> Daniel
> 
> 
> -- 
> LeVA
> 
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 
> 



Reply to: