LINUX.ORG.RU
ФорумAdmin

ssh не пускает юзеров кроме рута


0

0

$ ssh fireball@router fireball@router's password: Connection to router closed by remote host. Connection to router closed.

/var/log/messages : Jul 25 14:30:51 router sshd[1601]: Accepted password for fireball from X.X.X.X port 40013 ssh2

router# cat /etc/passwd|grep fire fireball:x:1003:100:,,,:/home/fireball:/bin/bash

sshd_config дефолтный OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004 Slackware 10

sshd -p 2222 -dd после ввода пароля вот что выдает ------------ debug1: attempt 2 failures 2 debug2: input_userauth_request: try method password Accepted password for fireball from X.X.X.X. port 40115 ssh2 debug1: monitor_child_preauth: fireball has been authenticated by privileged process Accepted password for fireball from X.X.X.X port 40115 ssh2 debug2: mac_init: found hmac-md5 debug2: mac_init: found hmac-md5 debug2: User child is on pid 1998 debug1: permanently_set_uid: 1003/100 debug2: set_newkeys: mode 0 debug2: set_newkeys: mode 1 debug1: Entering interactive session for SSH2. debug2: fd 7 setting O_NONBLOCK debug2: fd 8 setting O_NONBLOCK debug1: server_init_dispatch_20 debug1: server_input_channel_open: ctype session rchan 0 win 65536 max 16384 debug1: input_session_request debug1: channel 0: new [server-session] debug1: session_new: init debug1: session_new: session 0 debug1: session_open: channel 0 debug1: session_open: session 0: link with channel 0 debug1: server_input_channel_open: confirm session debug1: server_input_channel_req: channel 0 request pty-req reply 0 debug1: session_by_channel: session 0 channel 0 debug1: session_input_channel_req: session 0 req pty-req login_get_lastlog: Cannot find account for uid 1003 debug1: do_cleanup debug1: do_cleanup ----------------

локально: root@router:~# su fireball I have no name!@router:/root$ whoami whoami: cannot find username for UID 1003 I have no name!@router:/root$ exit exit root@router:~# usermod -l fireball fireball root@router:~# su fireball I have no name!@router:/root$ exit

как это побороть?

anonymous

Сорри.

$ ssh fireball@router
fireball@router's password:
Connection to router closed by remote host.
Connection to router closed.

/var/log/messages :
Jul 25 14:30:51 router sshd[1601]: Accepted password for fireball from X.X.X.X
port 40013 ssh2

router# cat /etc/passwd|grep fire
fireball:x:1003:100:,,,:/home/fireball:/bin/bash

sshd_config дефолтный
OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004
Slackware 10

sshd -p 2222 -dd
после ввода пароля вот что выдает
------------
debug1: attempt 2 failures 2
debug2: input_userauth_request: try method password
Accepted password for fireball from X.X.X.X. port 40115 ssh2
debug1: monitor_child_preauth: fireball has been authenticated by privileged process
Accepted password for fireball from X.X.X.X port 40115 ssh2
debug2: mac_init: found hmac-md5
debug2: mac_init: found hmac-md5
debug2: User child is on pid 1998
debug1: permanently_set_uid: 1003/100
debug2: set_newkeys: mode 0
debug2: set_newkeys: mode 1
debug1: Entering interactive session for SSH2.
debug2: fd 7 setting O_NONBLOCK
debug2: fd 8 setting O_NONBLOCK
debug1: server_init_dispatch_20
debug1: server_input_channel_open: ctype session rchan 0 win 65536 max 16384
debug1: input_session_request
debug1: channel 0: new [server-session]
debug1: session_new: init
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with channel 0
debug1: server_input_channel_open: confirm session
debug1: server_input_channel_req: channel 0 request pty-req reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req pty-req
login_get_lastlog: Cannot find account for uid 1003
debug1: do_cleanup
debug1: do_cleanup
----------------

локально:
root@router:~# su fireball
I have no name!@router:/root$ whoami
whoami: cannot find username for UID 1003
I have no name!@router:/root$ exit
exit
root@router:~# usermod -l fireball fireball
root@router:~# su fireball
I have no name!@router:/root$ exit

как это побороть?

anonymous
()
Ответ на: комментарий от anonymous

/etc/passwd живой? Третьим полем в нем идет UID юзера, имя которого - в первом поле.

AngryElf ★★★★★
()
Ответ на: комментарий от anonymous

"I have no name!@router:/root$" обычно бывает из-за неправильных правов на /etc/passwd, его отсутствия или неправильного формата.

spirit ★★★★★
()
Ответ на: комментарий от spirit

root@router:/etc# id fireball
uid=1003(fireball) gid=100(users) groups=100(users)

root@router:/etc# cat /etc/passwd|grep fire
fireball:x:1003:100:fireball:/home/fireball:/bin/bash

root@router:/etc# cat /etc/shadow|grep fire
fireball:$1$MET0hcI/$ouAwdSxz9pvTOksIhfauy.:12625:0:99999:7:::

root@router:~# ls -l /etc/passwd
-rw-r--r-- 1 root root 806 2004-07-26 19:04 /etc/passwd

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.