創(chuàng)建用戶tammy,其用戶ID為2020,此用戶的密碼應(yīng)當(dāng)是redhat。
創(chuàng)建用戶:
[root@localhost ~]# useradd -u 2020 tammy
創(chuàng)建密碼:
[root@localhost ~]# echo “redhat” |passwd –stdin tammy
Changing password for user tammy.
passwd: all authentication tokens updated successfully.
檢驗(yàn)用戶:
[root@localhost ~]# id tammy
uid=2020(tammy) gid=2020(tammy) groups=2020(tammy)