我们将用户存储在LDAP中,还有一些在不同系统中具有意义的组(包括在内的组织角色wheel
)。也有工作站本地的组,例如,audio
或video
不希望放入LDAP中的组。现在,如果我在本地登录,我会得到那些本地组,但是如果我通过SSH登录到同一台机器上,我将缺少它们。如果我su
以后直接使用,它们当然会回来。我可能走错了路,但怀疑PAM。
来自的相关条目 nsswitch.conf
passwd: compat ldap
shadow: compat ldap
group: compat ldap
至于pam,始终是auth行,但其他行都相同
/etc/pam.d/sshd
auth include system-remote-login
/etc/pam.d/system-remote-login
(与system-local-login
我可能要补充的内容相同)
auth include system-login
/etc/pam.d/system-login
auth required pam_tally2.so onerr=succeed
auth required pam_shells.so
auth required pam_nologin.so
auth include system-auth
auth optional pam_gnome_keyring.so
account required pam_access.so
account required pam_nologin.so
account include system-auth
account required pam_tally2.so onerr=succeed
password include system-auth
password optional pam_gnome_keyring.so
session optional pam_loginuid.so
session required pam_env.so
session optional pam_lastlog.so
session include system-auth
session optional pam_gnome_keyring.so auto_start
session optional pam_motd.so motd=/etc/motd
session optional pam_mail.so
/etc/pam.d/su
auth sufficient pam_rootok.so
auth required pam_wheel.so use_uid
auth include system-auth
account include system-auth
password include system-auth
session include system-auth
session required pam_env.so
session optional pam_xauth.so
/etc/pam.d/common-auth:
auth required pam_group.so use_first_pass
可能是什么问题,我将如何解决?我很高兴提供所需的其他信息。
/etc/nsswitch.conf
看起来像group
什么?输出是getent YOURUSERNAME
什么?您的/etc/pam.d/sshd
@include 是否包含common- {session,auth,password,account}?