1.在一般用户下执行sudo命令提示llhtiger is not in the sudoers file. This incident will be reported.
原因:
redhat并没有把任何root用户之外的用户默认的添加到sudoers之中,我们只要把自己的用户添加到sudoers之中就可以了。
解决:
查找sudoers位置,whereis sudoers,一般存在于/etc/sudoers。
root登录,su root,修改sudoers文件属性,u+w,给写权限。
在root ALL=ALL(ALL) ALL 下添加自己的用户,xxx ALL=ALL(ALL) ALL
最后基本差不多了,要记得把读权限改回去的哟,否则系统不允许执行suoders文件,chmod u-w /etc/sudoers
原因:
redhat并没有把任何root用户之外的用户默认的添加到sudoers之中,我们只要把自己的用户添加到sudoers之中就可以了。
解决:
查找sudoers位置,whereis sudoers,一般存在于/etc/sudoers。
root登录,su root,修改sudoers文件属性,u+w,给写权限。
在root ALL=ALL(ALL) ALL 下添加自己的用户,xxx ALL=ALL(ALL) ALL
最后基本差不多了,要记得把读权限改回去的哟,否则系统不允许执行suoders文件,chmod u-w /etc/sudoers
2.ifconfig:command not found.
其实是因为ifconfig所在的路径/sbin没有包含在PATH当中,
打开/etc/profile,输入export PATH=$PATH:/sbin,重启,发现OK了