Solved Cannot login as user

While in root account in FreeBSD, i try to log in as a regular user (that created at install time) It says login failure. I remove the regular user, recreate it, still can login with password.
If i create another user with different name everything works as intended.
What may be happening?
 
Maybe hitting a language barrier, I no clue what you mean. Please explain in more detail what the problem is.
 
What does the /var/log/auth.log say?
Code:
an 12 11:01:37 FreeBSD login[3291]: 2 LOGIN FAILURES ON ttyv0
Jan 12 11:01:37 FreeBSD login[3291]: 2 LOGIN FAILURES ON ttyv0, 1234
Jan 12 11:02:04 FreeBSD login[3291]: 3 LOGIN FAILURES ON ttyv0
Jan 12 11:02:04 FreeBSD login[3291]: 3 LOGIN FAILURES ON ttyv0, kostas
Jan 12 11:02:06 FreeBSD login[3291]: login on ttyv0 as root
Jan 12 11:02:06 FreeBSD login[3291]: ROOT LOGIN (root) ON ttyv0
Jan 13 09:46:43 FreeBSD login[28872]: 2 LOGIN FAILURES ON pts/1
Jan 13 09:46:43 FreeBSD login[28872]: 2 LOGIN FAILURES ON pts/1, kostas
Jan 13 09:46:44 FreeBSD login[28872]: pam_acct_mgmt(): Authentication error
Jan 13 09:47:10 FreeBSD syslogd: last message repeated 1 times
Jan 13 09:47:25 FreeBSD syslogd: last message repeated 1 times
Jan 13 09:47:40 FreeBSD login[28872]: 4 LOGIN FAILURES ON pts/1
Jan 13 09:47:40 FreeBSD login[28872]: 4 LOGIN FAILURES ON pts/1, root
Jan 15 11:45:28 FreeBSD login[3208]: login on ttyv2 as root
Jan 15 11:45:28 FreeBSD login[3208]: ROOT LOGIN (root) ON ttyv2
Jan 15 11:46:18 FreeBSD login[65095]: 3 LOGIN FAILURES ON ttyv0
Jan 15 11:46:18 FreeBSD login[65095]: 3 LOGIN FAILURES ON ttyv0, kostas
Jan 15 11:46:20 FreeBSD login[65095]: login on ttyv0 as root
Jan 15 11:46:20 FreeBSD login[65095]: ROOT LOGIN (root) ON ttyv0
Jan 15 11:52:54 FreeBSD sshd[3048]: Server listening on :: port 22.
Jan 15 11:52:54 FreeBSD sshd[3048]: Server listening on 0.0.0.0 port 22.
Jan 15 11:53:07 FreeBSD login[3074]: login on ttyv0 as root
Jan 15 11:53:07 FreeBSD login[3074]: ROOT LOGIN (root) ON ttyv0
Jan 15 11:55:23 FreeBSD login[3128]: 2 LOGIN FAILURES ON ttyv0
Jan 15 11:55:23 FreeBSD login[3128]: 2 LOGIN FAILURES ON ttyv0, c
Jan 15 11:55:25 FreeBSD login[3128]: login on ttyv0 as root
Jan 15 11:55:25 FreeBSD login[3128]: ROOT LOGIN (root) ON ttyv0
Jan 15 11:57:35 FreeBSD login[3200]: 2 LOGIN FAILURES ON ttyv0
Jan 15 11:57:35 FreeBSD login[3200]: 2 LOGIN FAILURES ON ttyv0, kostas
Jan 15 11:57:36 FreeBSD login[3200]: login on ttyv0 as root
Jan 15 11:57:36 FreeBSD login[3200]: ROOT LOGIN (root) ON ttyv0
Jan 15 12:02:02 FreeBSD login[3265]: 2 LOGIN FAILURES ON ttyv0
Jan 15 12:02:02 FreeBSD login[3265]: 2 LOGIN FAILURES ON ttyv0, ^[[D
Jan 15 12:02:04 FreeBSD login[3265]: login on ttyv0 as root
Jan 15 12:02:04 FreeBSD login[3265]: ROOT LOGIN (root) ON ttyv0
Jan 15 12:03:07 FreeBSD login[3310]: login on ttyv0 as user
Jan 15 13:01:13 FreeBSD login[10186]: pam_acct_mgmt(): Authentication error
Jan 15 13:01:28 FreeBSD syslogd: last message repeated 2 times
Jan 15 13:01:30 FreeBSD login[10186]: 3 LOGIN FAILURES ON pts/0
Jan 15 13:01:30 FreeBSD login[10186]: 3 LOGIN FAILURES ON pts/0, root
Jan 15 13:01:55 FreeBSD login[10186]: 2 LOGIN FAILURES ON pts/0
Jan 15 13:01:55 FreeBSD login[10186]: 2 LOGIN FAILURES ON pts/0, pwd
Jan 15 13:01:55 FreeBSD login[10186]: login on pts/0 as user
Jan 15 13:02:02 FreeBSD su[10290]: user to root on /dev/pts/0
Jan 15 13:43:25 FreeBSD su[15762]: user to root on /dev/pts/0
 
It looks like a plain authentication failure, so if the user kostas is correct, you may have input a wrong password (different than that you input when you added the user). If the user kostas is still there, try changing the password. As root user, do passwd kostas.
 
I cannot log in as a specific user, while the password i put in is correct.
As root you can login, can't you? Else you actually have kind of a problem - tricky, but solvable.
Could be a code page problem. I guess, that's what SirDice meant with "Maybe hitting a language barrier".
Example to explain:
german and english KBs have switched Z and Y keys. If your computer is set to an english code table while you generate your pw, and if your password was 'noisy', you type 'noisy', but the computer saves your pw as 'noisz'.
Then when you login as an user with a german code page, and you don't respect the keys switched, you again type 'noisy', and this time your computer gets 'noisy', but expects 'noisz', so wrong pw.

You may try passwords using keys only matching english KBs and your local ones (I do that for my root password for when my machine does not come up far enough to provide my local code page.)
But that's only temporary, because for both cases - setting a pw, and login - the same code table shall be active, and used, which is the case within a default installation by the FreeBSD installer.
You have to dig for that either to get a clean solution, what got wrong - if code page was the actual cause for that, which you can also test by trying pws having english and local key codes matching. (In fact just the same keys need to be pressed - what's written on them the computer does not know; it simply receives a code from the KB which key was pressed, not which letter is assigned to it. That's job of the OS with code pages.)
 
It looks like a plain authentication failure, so if the user kostas is correct, you may have input a wrong password (different than that you input when you added the user). If the user kostas is still there, try changing the password. As root user, do passwd kostas.
It sems something strange is happening. I
Code:
rmuser kostas
and system responds
Code:
user (kostas) does not exist in the password database
but when i
Code:
adduser kostas
with groups wheel and video i get
Code:
cannot create 'zroot/home/lostas': dataset already exists
and error adding user kostas
 
Back
Top