New User added, bot not able to login via SSH
Hi All,
I have added new user successfully. but not able to login. Permission denied, please try again. Can anyone pls help on this. Kumaresan P |
How did you create the new user? If by useradd on the command line, did you set the home directory and default shell?
Did you use passwd to assign the user a password? Is this user able to login locally? |
Yes, via command line
not given any directory or shell. useradd kumsuser passwd kumsuser su kumsuser (happening from root) But not new connection |
Anything showing up in the log files?
|
not given any directory or shell.
I think if you assigned your user a home (login) directory you'd probably be able to ssh into the instance using the local users credentials. |
Code:
grep kumsuser /etc/passwd In case of no homedirectory, or homedirectory does not exist, it defaults to /; might be cause of the disconnect. Then again, password logins from ssh may not be allowed and only public/private keys are allowed... so many reasons, so many solutions :-) |
Quote:
You can use the "-D" switch with useradd to see the defaults, or set custom values as shown here: http://www.computerhope.com/unix/useradd.htm |
or use adduser instead of useradd
|
Consider also that ssh may require certain certificates or other information, which are (ordinarily) kept in a hidden .ssh directory in the user's home. This directory, if used, is required to exist and to have specific permissions. Probably your user-add process would not have set up these additional things.
|
I don't understand what is exactly happened, first one user added successfully with id 500, which i cant login. then i created one more with id 501 that i can login . Then i deleted first one and created the same name with id 502 which is now successfully logged in.
Can anyone explain..? |
Going back to my post from 4 days ago ...
Quote:
|
auth.log file not available, in secure.log file below lines printed
Mar 4 06:31:06 EDMS userdel[16734]: delete user 'kumsuser' Mar 4 06:31:06 EDMS userdel[16734]: removed group 'kumsuser' owned by 'kumsuser' Mar 4 06:31:28 EDMS useradd[16741]: new group: name=kumsuser, GID=500 Mar 4 06:31:28 EDMS useradd[16741]: new user: name=kumsuser, UID=500, GID=500, home=/home/kumsuser, shell=/bin/bash Mar 4 06:32:04 EDMS passwd: pam_unix(passwd:chauthtok): password changed for kumsuser Mar 4 06:33:05 EDMS sshd[16756]: pam_tally2(sshd:auth): user kumsuser (500) tally 19, deny 3 Mar 4 06:33:07 EDMS sshd[16756]: Failed password for kumsuser from 10.50.11.178 port 40959 ssh2 Mar 4 06:33:09 EDMS sshd[16756]: Failed password for kumsuser from 10.50.11.178 port 40959 ssh2 |
Seems pretty clear that the password is incorrect. Maybe you're using the wrong keyboard layout, and a 'z' is being used instead of a 'y', for example?
|
The pam_tally2 line in secure.log indicates the account was locked due to too many failed login attempts. It was locked after the 3rd attempt, so even if you entered the correct password after that, it wouldn't let you in until the account is unlocked. The pam_tally2 command is used list the current failed login tallies and to unlock the account.
|
Same user I deleted and recreated but then also not able to login, then i decided to create one more user now id is 501 and able to login. Now deleted the id 500 user. and created with same user name and id become 502, now able to login with that user name.
|
All times are GMT -5. The time now is 09:02 AM. |