≡ Menu

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:

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

Three files defines a user account

/etc/passwd file

ram:x:1003:1003:ram kumar:/home/ram:/bin/bash
charvi:x:1004:1004:charvi gite:/home/charvi:/bin/bash
vivek:x:1005:1005:vivek gite:/home/vivek:/bin/bash

/etc/group file


/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.

Share this tutorial on:

Like this? Follow us on Twitter OR support us by using Patreon

{ 1 comment… add one }
  • aref ghobadi August 27, 2015, 9:47 am

    thank you

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , , , , , , , , , , , , , ,