一、现像

root用户登录显示正常但以普通用户登录时报类似如下错误:

id: cannot find name for user ID 500
id: cannot find name for group ID 500
id: cannot find name for user ID 500

然后原本应显示用户名的位置被“I have no name!”代替。

 

二、原因

这个问题是因为普通用户没有权限读取/etc/passwd和/etc/group文件造成,添加权限即可。

 

三、处理办法

chmod 644 /etc/passwd
chmod 644 /etc/group

 

四、处理示例

如下是我本机的测试截图

id: cannot find name for user ID xxx处理办法

 

参考:

http://blog.csdn.net/andy572633/article/details/47296863

相关文章:

  • 2021-04-19
  • 2021-10-23
  • 2021-11-14
  • 2021-09-11
  • 2021-07-24
  • 2022-12-23
猜你喜欢
  • 2021-05-18
  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
  • 2021-12-18
  • 2021-11-02
相关资源
相似解决方案