今天安装Puppet,当install完成后启动puppetmaster时遇到如下错误:
启动 puppetmaster:could not change to group "puppet" Could not change to user puppet: Invalid user: puppet于是尝试手动添加组和用户,却不能添加:
#groupadd puppet groupadd: cannot open /etc/group用lsattr命令查看/etc/group的隐藏权限设定情况发现如下:
#lsattr /etc/group ----i--------e- /etc/group
i说明设定文件不能被删除、改名、设定链接关系,同时不能写入或新增内容。
用chattr命令对/etc/group去除i权限位:
#chattr -i /etc/group #lsattr /etc/group -------------e- /etc/group再使用groupadd命令时又发现:
#groupadd puppet groupadd: cannot open /etc/gshadow同样的思想,去除隐式权限i位,再添加组。后面设置如下:
#chattr -i /etc/gshadow #groupadd puppet #useradd -g puppet puppet useradd: cannot open /etc/passwd #chattr -i /etc/passwd #useradd -g puppet puppet useradd: cannot open /etc/shadow #chattr -i /etc/shadow #useradd -g puppet puppet #/etc/init.d/puppetmaster start Startting puppetmaster: SUCCESS最后puppetmaster终于启动成功!
本文产生于个人工作学习笔记,转载请注明出处http://blog.csdn.net/horace20