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
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
prouser:x:1001:vivek,charvi ram:x:1003: charvi:x:1004: vivek:x:1005:
ram:$1$4tuS/iYO$CsmE8cD7j/96ca7K3gJ9Y/:13061:0:99999:7::: charvi:$1$4tuS/iYO$CsmE8cD7j/96ca7K3gJ9Y/:13066:0:99999:7::: vivek:$1$4tuS/iYO$CsmE8cD7j/96ca7K3gJ9Y/:13064:0:99999:7:::
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.
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop