Manage User Account

Linux was created with security in mind. That's why after you boot Linux, you'll see login and password prompts. To access Linux for the first time you can enter the root account and password (some distributions give you the option to create a user account during installation). but keep this in mind Running as root can be dangerous!

as you can accidentally delete system files or any other important files.

To create a user you need the root privilege (in some distributions you may need to prepend the sudo command everytime you want to execute a command that need root's privilege). if you're not root, you can become root with the su, you'll will be prompted to enter the root password.

if you're root. you can add a user with the command

useradd mike

that command will create a new user named mike, the useradd command will add a user entry in a file called passwd in the /etc directory. 


Some versions of useradd aks you for details about hte user, such as the user's full name and password. if yours doesn't, you can change a user password by using the passwd command. Again, you need a root privilege, except you're changing your own password.

 passwd amy

it will then propmts you for a new pasword, and then asks you to type it again to verify the change. if you've successfully change the user's password, it will be reflected in /etc/passwd entry as an encrypted string.