作业三:

以操作文件的方式,新建一个用户alex

echo "alex:x:1200:1200::/home/alex/:/bin/bash" >> /etc/passwd

echo "alex:x:1200:" >> /etc/group

echo "alex::17239:0:99999:7:::" >> /etc/shadow

echo "alex:::" >> /etc/gshadow

mkdir /home/alex

touch /var/spool/mail/alex

cp -r /etc/skel/.[!.]* /home/alex

chown -R alex.alex /home/alex

chown alex.mail /var/spool/mail/alex

04-27 07:04