当前第2页 返回上一页
1 2 3 | ## Allow root to run any commands anywhere
root ALL=(ALL) ALL
prefma ALL=(ALL) ALL #这个是新用户
|
然后输入命令 wq! 保存修改。
3、收回权限
1 2 | [root@localhost~]# chmod -v u-w /etc/sudoers
mode of ‘/etc/sudoers’ changed from 0640 (rw-r-----) to 0440 (r--r-----)
|
4、新用户登录
新建连接,使用新创建的用户登录,并进行验证,比如:
1 2 3 4 | [prefma@localhost~]$ pwd
/home/prefma
[prefma@localhost~]$ ls -l /etc/sudoers
-r--r----- 1 root root 3995 Oct 16 22:42 /etc/sudoers
|
相关参考:centOS教程
以上就是如何在centos下创建新用户名和密码的详细内容,更多文章请关注木庄网络博客!
返回前面的内容
相关阅读 >>
CentOS复制时权限不够如何解决
在CentOS系统下包更新的命令
CentOS下中文显示乱码怎么办
CentOS下ping不通网关怎么办
关于常用CentOS命令及快捷键的汇总
CentOS查看mysql是否安装的方法
CentOS 修改ip的方法
linux中使用yum安装nginx的实例详解
CentOS系统下nginx启动不了怎么办
CentOS启动时报错了怎么解决
更多相关阅读请进入《CentOS》频道 >>
转载请注明出处:木庄网络博客 » 如何在centos下创建新用户名和密码