Chinaunix

标题: solaris下删除用户 [打印本页]

作者: hyster_dct    时间: 2008-06-02 10:01
标题: solaris下删除用户
大家好

solaris偶用userdel用户后,没有报错。正常删除
在/etc/passwd下没有该用户了

但是su - 用户名还是可以切换过去,我用userdel再次删除提示用户名不存在。
作者: hyster_dct    时间: 2008-06-02 10:13
标题: 回复 #1 hyster_dct 的帖子
没人知道?
自己顶一下
作者: briangao    时间: 2008-06-02 10:40
The only posibility is that you are using some sort of naming service such as nis, nis+ or ldap etc. Can you show me the result of:  grep passwd /etc/nsswitch.conf ?
作者: Umysun    时间: 2008-06-02 10:42
有可能是在ldap 上的用户吧???
作者: dingyilong    时间: 2008-06-02 11:15
删除的时候加个 -r 的参数
作者: yuhuohu    时间: 2008-06-02 11:39
原帖由 briangao 于 2008-6-2 10:40 发表
The only posibility is that you are using some sort of naming service such as nis, nis+ or ldap etc. Can you show me the result of:  grep passwd /etc/nsswitch.conf ?



同意,很可能用了多种方法处理用户名,首选的/etc/passwd中用户被删除后,在nis or ldap上依然有该用户。所以可以su,但无法删除
作者: hyster_dct    时间: 2008-06-02 13:00
标题: 回复 #6 yuhuohu 的帖子
应该是nis的问题
# more nsswitch.nis |grep passwd
# the following two lines obviate the "+" entry in /etc/passwd and /etc/group.
passwd:     files nis

如何才能彻底的删除?
作者: dingyilong    时间: 2008-06-02 13:38
去yp下make一下
作者: hyster_dct    时间: 2008-06-02 14:35
标题: 回复 #8 dingyilong 的帖子
make了,还是有个用户存在
作者: yuhuohu    时间: 2008-06-02 20:52
原帖由 hyster_dct 于 2008-6-2 13:00 发表
应该是nis的问题
# more nsswitch.nis |grep passwd
# the following two lines obviate the "+" entry in /etc/passwd and /etc/group.
passwd:     files nis

如何才能彻底的删除?



错了。。应该要看/etc/nsswitch.conf ,不是nsswitch.nis,.nis,.dns。。。之类的文件仅是模板文件,不起作用的

如果真是NIS,要去NIS SERVER上删除这个用户

或者。。如果你确信本机不需要使用NIS or 其他的东西解析系统登录帐号名的话,直接把nsswitch.conf中的passwd条目改成passwd:files即可,
作者: briangao    时间: 2008-06-02 21:13
错了。。应该要看/etc/nsswitch.conf ,不是nsswitch.nis,.nis,.dns。。。之类的文件仅是模板文件,不起作用的
My bad, it was a type error. I meant /etc/nsswitch.conf. Thanks yuhuohu  for pointing it out.
作者: wolfchyu    时间: 2008-06-03 00:15
学习了,不错:wink:




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2