useradd <username of your choice>
Username must be limited to 8 characters, started with alphabets and must only contains alphabets and numbers.
e.g. Add a new user account "yuni",
[root@lovely-linux /root]# useradd yuni [root@lovely-linux /root]#
This utility returns nothing visible upon successful account creation. The account is not enabled unless you give a password to it.
passwd <username of your choice>
Since you are currently logged in as root, you do not need to supply the current password of the user yuni. No asterisk "*" will be shown while typing the passwords.
[root@lovely-linux /root]# passwd yuni Changing password for user yuni New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully [root@lovely-linux /root]#
You may try login as the newly created account in another virtual console.. To switch to another virtual console, say the first virtual console, press Ctrl-Alt-F1.
At the login prompt, type in your own username. At the password prompt, type in your own password for the supplied username. If the password and the username matches, you will be given a shell (/bin/bash - the default when the account is created) and the current directory is your home (/home/<your username>).
e.g.
Red Hat Linux release 7.1 (Seawolf) Kernel 2.4.3-12 on an i686 lovely-linux login: yuni Password: [yuni@lovely-linux yuni]$ _ [yuni@lovely-linux yuni]$ logout_
To switch back to your graphical screen, press Ctrl-Alt-F7. Remember to logout before switching back to your graphical screen.
To delete a user account,
userdel <username>
To check if the user is really deleted, you can use finger:
[root@lovely-linux root]# finger yuni Login: yuni Name: yuni Directory: /home/yuni Shell: /bin/bash Never logged in. No mail. No Plan. [root@lovely-linux root]# userdel yuni [root@lovely-linux root]# finger yuni finger: yuni: no such user. [root@linux3 /root]#