Creating user manually using vi
To add user manually using vi
a. user vipw command and go to end of the page and yang the current user info and paste. Change the user name, id, home directory and other relevant info.
b. use passwd command to change the just created user password.
c. vigr to add group entry, yank existing users group and paste. make changes according to the user group.
d. vigr -s to add entry to gshadow.
e. Create user's home directory and copy login initialization files from /etc/skel directory.
Note: When you use cp command to copy the files, it does not include hidden files. To turn on this feature, run the following command.
[root@my32GB ~]# shopt -s dotglob
[root@my32GB ~]# cp /etc/skel/* /home/ramila/
Once done, turn it off (unset) using the following command,
[root@my32GB ~]# shopt -s dotglob
======= detail =======
[root@my32GB ~]# vipw
[root@my32GB ~]# cp -a /etc/skel/.??* /home/ramila/
[root@my32GB ~]# vipw -s
or to set user password,
[root@my32GB ~]# passwd ramile
[root@my32GB ~]# vigr
[root@my32GB ~]# id ramila
[root@my32GB ~]# vigr -s
[root@my32GB ~]# mkdir /home/ramila
[root@my32GB ~]# cp -a /etc/skel/.??* /home/ramila/