4、linux建組
一 手動創建用戶流程
1) 新建用戶natasha,uid為1000,gid為555,備註信息為“master”
vim /etc/passwd
natasha:x:1000:555:master:/home/Natasha:/bin/bash
2) 修改natasha用戶的家目錄為/Natasha
[[email protected] ~]# vim /etc/passwd
[[email protected] ~]# vim /etc/shadow
[[email protected] ~]# vim /etc/group
[[email protected]
[[email protected] ~]# mkdir /home/Natasha
[[email protected] ~]# ls -a /home/Natasha/
. ..
[[email protected] ~]# cp -r /etc/skel/.[!.]* /Natasha/
[[email protected] ~]# touch /var/spool/mail/Ntasha
[[email protected] ~]# id natasha
uid=1000(natasha) gid=555(natasha) 組=555(natasha)
3) 查看用戶信息配置文件的最後一行
[[email protected] ~]# tail -1 /etc/passwd
natasha:x:1001:555:master:/home/Natasha:/bin/bash
4) 為natasha用戶設置密碼“123”
[[email protected] ~]# passwd natasha
更改用戶 natasha 的密碼 。
新的 密碼:
無效的密碼: 密碼少於 8 個字符
重新輸入新的 密碼:
passwd:所有的身份驗證令牌已經成功更新。
5) 查看用戶密碼配置文件的最後一行
[[email protected]