Linux – What defines a user account?

Q. Can you tell us what defines a user account under Linux operating system?A. Linux is multi-user system. This means more than one person can use the Linux. With the help of various software servers, configurations, and commands, multiple users can use Linux.

In order to gain access to the system and its resources, users are required to log in. By controlling access to system, you can prevent unauthorized users from using system as well as control access to data.

Most modern Linux distribution creates more than two user accounts when you install first time.

The first is root user. The root is superuser (you can compare this account with Administrator account under MS-Windows 2000/2003/XP server). The root has all rights to all files, system services, and softwares.

The second user is a normal (general-purpose) user account that you name. It has limited access to Linux.

More on root

Root account has full access to system so it is recommended that you do not use root it unless you have to. When you need to perform system level administrative task (such as adding new users, installing software etc) they you have to use the root account using su or sudo command. If you are new Linux, admin and use the root for all activity then senior (or coworkers) will make fun out of you.

Your /home directory

As soon as new user created, a home directory is automatically created for that user in /home directory. This is default location. However, in complex setup this location is changed according to organization requirements. For example, servers cluster hosting more than 2000 web site use following structure as a home directory: /wwwroot/a/abc.com /wwwroot/a/aaaa.com /wwwroot/b/bbb.com

Please note that the root user has its own home directory called /root.

/etc/shadow file

For users to successfully log in, they must have a valid user name, password and other information defined in /etc/passwd and /etc/shadow files. The user may be granted additional access to additional groups on the system via /etc/group file. Almost all users have a home directory under /home, where user can store their personal data/files.