公司搭系统,需要对网络进行调整,用的是Juniper EX系列交换机
结果调整完配置,
要commit时报错
提示信息如下:
root# commit
error: could not open /var/etc/pam.conf+: Operation not permitted
error: commit failed: foreign file propagation failed during preprocessing
度娘没找到解决办法,上bing国际版,直接跳到Juniper英文页面,还好有救
Cause:
Permission is missing in the authentication file.
File corruption with pam.conf or pam.conf+ file.
原因:
身份验证文件中缺少权限。
pam.conf或pam.conf+文件损坏。
解决办法:
root#exit
root>start shell #启动shell
root:RE:0%
root:RE:0% ls -lo /var/etc/pam #检查pam开头的文件权限
ls: /var/etc/pam: No such file or directory #!竟然没有这个文件!囧
root:RE:0% ls -lo /var/etc/ #换个方法,查上层路径
total 324
...
-rw-r----- 1 root wheel - 203 Mar 6 09:16 pam.conf
-rw-r----- 1 root wheel - 203 Mar 6 09:08 pam.conf-
...
还好有找到
root:RE:0% chflags 0 /var/etc/pam.conf+
root:RE:0% chmod 777 /var/etc/pam.conf
重新设置权限
root:RE:0% cli
{master:0}
root>edit
Entering configuration mode
{master:0}[edit]
root# commit full
configuration check succeeds
commit complete
解决问题