RHEL5.3下手动创建用户
生活随笔
收集整理的這篇文章主要介紹了
RHEL5.3下手动创建用户
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
手動建立帳號 [root@localhost ~]# id feige id: feige: No such user [root@localhost ~]# echo "feige::1000:1000::/home/feige:/bin/bash" >> /etc/passwd [root@localhost ~]# id feige uid=1000(feige) gid=1000 groups=1000 [root@localhost ~]# su - feige su: warning: cannot change directory to /home/feige: No such file or directory -bash-3.00$ -bash-3.00$ pwd /root -bash-3.00$ whoami feige -bash-3.00$ exit logout [root@localhost ~]# [root@localhost ~]# ls -ld ~feige ls: /home/feige: No such file or directory [root@localhost ~]# cp -r /etc/skel/ ~feige [root@localhost ~]# echo "feige::1000:" >> /etc/group [root@localhost ~]# chown -R feige:feige ~feige/ [root@localhost ~]# chmod 0700 ~feige/ [root@localhost ~]# ls -ld ~feige/ drwx------ 2 feige feige 4096 May 5 19:50 /home/feige/ [root@localhost ~]# su - feige [feige@localhost ~]$
轉載于:https://blog.51cto.com/crazylinux/160793
總結
以上是生活随笔為你收集整理的RHEL5.3下手动创建用户的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 编写一个Windows服务程序,定时从数
- 下一篇: cisco防火墙