可以在linux系统中添加第二个/etc/passwd +/etc/影子+ /etc/group组合吗?
/etc/passwd
/etc/passwd2
/etc/shadow
/etc/shadow2
/etc/group
/etc/group2在身份验证过程中,PAM应该使用所有这些文件。
背景是一个着色的应用程序,应该添加/删除主系统用户和组通过联合rw-挂载。但如果可能的话,我不想在主密码中合并这两个世界。
发布于 2020-01-15 08:35:52
由于pam_unix使用NSS访问passwd、shadow和group文件,因此可以使用适当的NSS模块(如libnss-外派用户 )并修改/etc/nsswitch.conf以包含:
passwd: compat extrausers
group: compat extrausers
shadow: compat extrausers外部用户模块允许您使用位于/var/lib/extrausers (硬编码)位置的第二组文件。
https://serverfault.com/questions/998405
复制相似问题