Darui's blog

Home | About | Contacts | Archive

Linux创建用户

创建新用户

[root@localhost ~]# adduser linuxidc

为这个用户初始化密码,linux会判断密码复杂度,不过可以强行忽略:

[root@localhost ~]# passwd linuxidc

授权

[root@localhost ~]# vim /etc/sudoers

root ALL=(ALL) ALL
linuxidc ALL=(ALL) ALL #这个是新增的用户

第一次使用会提示你,你已经化身超人,身负责任。而且需要输入密码才可以下一步。如果不想需要输入密码怎么办,将最后一个ALL修改成NOPASSWD: ALL。

Category: contos7
Tags: [ linux  contos7  ]

Darui's blog | 鲁ICP备 15018213号-1 | 本站作品采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可。 | Build with Github and true minimal theme