Warm tip: This article is reproduced from serverfault.com, please click

linux-无法获得新用户的SSH访问权限

(Unable to get the SSH access for a new user)

发布于 2021-03-19 08:30:22

我在ubuntu 10用户名上创建了一个新用户:codeuser

现有一个名为“ admin”的用户。现在,我的问题是我无法使用codeuser凭据直接连接到服务器。但是,我可以通过“ admin”通过SSH进行登录,然后通过su(将用户更改为codeuser)进行连接,它可以正常工作。如何获得shell对codeuser用户的访问权限?

这是我的文件的输出:

cat /etc/passwd

root:x:0:0:root:/root:/bin/bash
www-data:x:33:33:www-data:/var/www:/bin/bash
admin:x:1000:1000:,,,:/home/admin:/bin/bash
ftp:x:107:65534::/home/ftp:/bin/false
codeuser:x:1004:33::/home/codeuser:/bin/bash


cat /etc/group

root:x:0:
www-data:x:33:
codeuser:x:1005:



iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination          
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:mysql  

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination          

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Questioner
Stewie
Viewed
11
HUB 2011-04-02 01:18:35

在/ etc / ssh / sshd_config中查看允许的用户列表。如果可以,则问题更加复杂。尝试以“ ssh codeuser @ your-server -v”身份连接