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

creating password for shadow file



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 user, because they will add it to the /etc/passwd|shadow file. I managed to create a passwd file, and wrote the user name and uid, and homedir etc... by hand. After that I used htpasswd program to create a passwd for the user. This passwd/shadow files are used by an ftp server. And the shadow file must be encrytped with md5. So 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. When I try to login with 'user' via ftp, it says username and/or password was not accepted, so the passwd generation didn't work.

My question: Is it possible to create passwords for shadow file with a command line tool? Is this htpasswd the right tool for this? Or if this is not possible, then how can I specify another destination shadow/passwd file for the adduser/useradd program.

Thanks!


--
LeVA




Reply to: