I'm trying to add a new user account to my ftp server.
I used
useradd -p password -d /home/newuser -s newuser
now when he tries to log in it accepts the UID and asks for a password, when i try to enter the password it says access denied.
I'm kinda new to the ADMIN side, I inherited a huge mess from the last guy and have been trying to sort out the whole mess.
it is an FTP server but should allow ssh access.
Any help is greatly appreciated.
From serverfault
-
-p
expects the password hashed using crypt. Use thepasswd
command to set the password interactively.More specifically:
passwd newuser
: how can i set a default password using adduser?Warner : I typically `useradd` and then `passwd`. Some distributions and UNIXes have scripts, such as in Linux's Slackware. I've known the script to be called `adduser`. If you don't have one, you can write your own.Warner : If you really want to know how to generate password crypt, find a utility to do it for you or you can copy the password crypt for a password you know from /etc/shadow. Careful with escaping control characters such a `$` when copy/pasting.From Warner -
By the useradd man page:
-p, --password PASSWORD The encrypted password, as returned by crypt(3). The default is to disable the account.
So, you set the hashed password to be that of the actual one. The easiest option at this point is to manually reset the password. As root:
passwd <username>
Warner : I have visions of typeracer.. +1 for good answer.: how can i set a default password using adduser?packs : Setting a default password is a pretty bad practice, as it creates a known exploit path. I'm guessing this is a pretty small scale environment, so I would recommend either generating a scary password for each new user (using apg or similar), or having the users stop by so they can type in their initial password.From packs
0 comments:
Post a Comment