
如何在%ign%ignore_a_1%re_a_1%下创建新用户名和密码?
一、创建新用户
1、创建一个新用户:prefma
[root@localhost ~]# adduser prefma
2、为新用户创建初始化密码
[root@localhost~]# passwd prefmaChanging password for user prefma.New password: # 输入密码Retype new password: # 再次输入密码passwd: all authentication tokens updated successfully.
二、授权
个人用户的权限只可以在本home下有完整权限,其他目录需要别人授权。经常需要root用户的权限,可以通过修改sudoers文件来赋予权限。
新创建的用户并不能使用sudo命令,需要给他添加授权。
1、查找sudoers文件路径并赋予权限
易森网络企业版
如果您是新用户,请直接将本程序的所有文件上传在任一文件夹下,Rewrite 目录下放置了伪静态规则和筛选器,可将规则添加进IIS,即可正常使用,不用进行任何设置;(可修改图片等)默认的管理员用户名、密码和验证码都是:yeesen系统默认关闭,请上传后登陆后台点击“核心管理”里操作如下:进入“配置管理”中的&ld
0 查看详情
1 [root@localhost~]# whereis sudoers # 查找sudoers文件路径2 sudoers: /etc/sudoers /etc/sudoers.d /usr/share/man/man5/sudoers.5.gz3 [root@localhost~]# ls -l /etc/sudoers # 查看权限4 -r--r----- 1 root root 3938 Sep 6 2017 /etc/sudoers # 只有读权限5 [root@localhost~]# chmod -v u+w /etc/sudoers # 赋予读写权限6 mode of ‘/etc/sudoers’ changed from 0440 (r--r-----) to 0640 (rw-r-----)
2、修改sudoers文件
输入命令 vim /etc/sudoers 修改sudoers文件,添加新用户信息:
## Allow root to run any commands anywhereroot ALL=(ALL) ALLprefma ALL=(ALL) ALL #这个是新用户
然后输入命令 wq! 保存修改。
3、收回权限
[root@localhost~]# chmod -v u-w /etc/sudoersmode of ‘/etc/sudoers’ changed from 0640 (rw-r-----) to 0440 (r--r-----)
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下创建新用户名和密码的详细内容,更多请关注创想鸟其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/871042.html
微信扫一扫
支付宝扫一扫




