【问题标题】:ssh with compat nis on solaris 10在 solaris 10 上使用兼容 nis 的 ssh
【发布时间】:2009-11-22 03:03:45
【问题描述】:

我有一个使用以下配置的带有 ssh 和 NIS 的可工作的 solaris 10 服务器:

# /etc/nsswitch.conf
passwd:     files nis
group:      files nis

# /etc/ssh/sshd_config
 Protocol 2
 Port 22
 ListenAddress ::
 AllowTcpForwarding no
 GatewayPorts no
 X11Forwarding yes
 X11DisplayOffset 10
 X11UseLocalhost yes
 PrintMotd no
 KeepAlive yes
 SyslogFacility auth
 LogLevel info
 HostKey /etc/ssh/ssh_host_rsa_key
 HostKey /etc/ssh/ssh_host_dsa_key
 ServerKeyBits 768
 KeyRegenerationInterval 3600
 StrictModes yes
 LoginGraceTime 600
 MaxAuthTries       6
 MaxAuthTriesLog    3
 PermitEmptyPasswords yes
 PasswordAuthentication yes
 PAMAuthenticationViaKBDInt yes
 PermitRootLogin yes
 Subsystem  sftp    /usr/lib/ssh/sftp-server
 IgnoreRhosts yes
 RhostsAuthentication no
 RhostsRSAAuthentication no
 RSAAuthentication yes

现在,我想切换到兼容模式:

# /etc/nsswitch.conf
passwd:     compat
group:      files nis

我添加了几个用户:

# /etc/passwd
+luke:x:::::

运行pwvcon,然后用户luke 的密码验证不再起作用(虽然公钥仍然可以)。

我的设置有问题吗?

【问题讨论】:

    标签: ssh solaris nis


    【解决方案1】:

    来自passwd(4)

    如果 +name 条目具有非空值 密码 [..] 该字段的值 覆盖包含在 备用命名服务。

    您能看看删除 passwd 列中的“x”并再次运行 pwconv 是否有帮助?

    编辑:第一个猜测完全错误,请参阅 cmets,所以这是另一个猜测 - 我现在无法破坏 Sun 的配置,抱歉 ;)

    【讨论】:

    • 这不是我从手册页Valid only for passwd and group; implements "+" and "-". See Interaction with +/- syntax. 中理解的。那么你将如何只授权本地帐户 + 一堆 NIS 帐户?
    • Drat,我应该等到我回去工作,当然你是对的,我弄错了,“files nis”不需要+。
    • 是的,就是这样。向/etc/passwd 添加登录时,密码必须设置为空。然后pwconv 更新它和/etc/shadow,添加一个x 密码和一个空的影子条目+luke::::::。谢谢。
    猜你喜欢
    • 1970-01-01
    • 2012-08-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-04
    • 1970-01-01
    相关资源
    最近更新 更多