Skip to content

nixCraft

Linux and Unix tutorials for new and seasoned sysadmin

  • Home
  • About
  • Linux Shell Scripting TutoriaL
  • RSS/Feed
  • Donations
  • Search

nixCraft

Linux and Unix tutorials for new and seasoned sysadmin

nixCraft

Linux – What defines a user account?

last updated May 13, 2008 in Categories Linux

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.

Adblock detected 😱
My website is made possible by displaying online advertisements to my visitors. I get it! Ads are annoying but they help keep this website running. It is hard to keep the site running and producing new content when so many people block ads. Please consider donating money to the nixCraft via PayPal/Bitcoin, or become a supporter using Patreon.

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.

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

prouser:x:1001:vivek,charvi
ram:x:1003:
charvi:x:1004:
vivek:x:1005:

/etc/shadow file

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.

Share on Facebook Twitter

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Your support makes a big difference:

I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft takes a lot of my time and hard work to produce. If everyone who reads nixCraft, who likes it, helps fund it, my future would be more secure. You can donate as little as $1 to support nixCraft:

Become a Supporter Make a contribution via Paypal/Bitcoin

1 comment

  1. aref ghobadi says:
    August 27, 2015 at 9:47 am

    Hi,
    thank you

    Still, have a question? Get help on our forum!

Post navigation

Previous FAQ: Previous post: Tape drives naming convention under Linux
Next FAQ: Next post: Understanding /etc/passwd File Format
Tagged as: Tags /etc/passwd, access to data, administrative task, administrator account, coworkers, default location, etc passwd, example servers, installing software, linux distribution, ms windows 2000, multiple users, organization requirements, root account, root root, root user, software etc, software servers, unauthorized users

Cool Linux penguin shirt

FEATURED ARTICLES

  • 1
    30 Cool Open Source Software I Discovered in 2013
  • 2
    30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
  • 3
    Top 32 Nmap Command Examples For Linux Sys/Network Admins
  • 4
    25 PHP Security Best Practices For Linux Sys Admins
  • 5
    30 Linux System Monitoring Tools Every SysAdmin Should Know
  • 6
    40 Linux Server Hardening Security Tips
  • 7
    Linux: 25 Iptables Netfilter Firewall Examples For New SysAdmins
  • 8
    Top 20 OpenSSH Server Best Security Practices
  • 9
    Top 25 Nginx Web Server Best Security Practices
  • 10
    My 10 UNIX Command Line Mistakes

Related FAQs & HowTos:

  • How to add a ssh user in FreeBSD server
  • Could not chdir to home directory /root: No such file or directory Error and Solution
  • UNIX Create User Account
  • FreeBSD: Delete User Account Command
  • Linux Change Default User Home Directory While Adding A New User
  • Linux add a user using command line tools
  • Understanding /etc/passwd File Format
  • How to create a user account on Ubuntu Linux
  • Move or migrate user accounts from old Linux server to a new Linux server
  • Delete SSH Keys
  • Linux setup shared directory
  • Can I create another root user account in Linux / UNIX?
  • Linux Drop User – Remove a Linux user
  • Where are the passwords of the users located in Linux?
  • Linux delete user command

Sign up for my newsletter

Sign up for my newsletter



RSS Recently updated

  • Debian Linux 9.7 released and here is how to upgrade it
  • Ubuntu Enable & Set up Automatic Unattended Security Updates
  • Linux hide processes from other users and ps command
  • Understanding Bash fork() Bomb :(){ :|:& };: code
  • vim-plug: A beautiful and minimalist vim plugin manager for Linux/Unix users
  • Linux / UNIX: Bash Script Sleep or Delay a Specified Amount of Time
  • KSH redirect stdout and stderr to a file on Linux or Unix
  • Linux / Unix Find Command Avoid Permission Denied Messages
  • How To Nginx Redirect All HTTP Request To HTTPS Rewrite 301 Rules
  • Linux/Unix desktop fun: Simulates the display from 'The Matrix'

Corporate Patron

  • Linode
  • Cloudflare
  • Prospect One
nixCraft @2000-2019 nixCraft. All rights reserved.
  • PRIVACY
  • TERM OF SERVICE
  • CONTACT/EMAIL
  • DONATIONS
  • Search