What is an Identity? Users, Groups & Permissions Explained

Learn the fundamental concept that connects Linux users, Windows Active Directory, and AWS IAM. One mental model applies everywhere — from your laptop to the cloud.

Diagram showing a user identity as a key unlocking resources, with users, groups, and permissions illustrated
📧

Get weekly IT guides

Join 5,000+ IT professionals

Subscribe Free

Every computer on earth has a gatekeeper. You’ve met it — it’s the login screen. But have you ever wondered how the computer actually decides what you can and can’t do once you’re in?

Whether you’re on your home laptop, SSHing into a Linux server, or configuring AWS — there is one mental model powering all of it. Learn it once. Use it everywhere for the rest of your career.

What is an Identity?

An identity is anything that can take an action on a computer system. It’s the answer to the question: “Who is doing this?”

An identity isn’t just a person. It can be:

TypeExampleWhat It Does
Human Usershekhar, root, aliceYou — the person typing commands
Service Accountwww-data, mysql, nginxPrograms that run as their own “user”
ProcessYour browser, a cron jobEvery running program inherits an identity
Machine IdentityAn EC2 instance, a Kubernetes podCloud resources that need to call APIs
🔑 The Core Insight

Every action on a computer is performed by an identity.

When nginx serves a web page, it runs as the www-data user. When your cron job deletes old logs, it runs as root (or whoever scheduled it). When you run sudo apt install, you temporarily borrow root’s identity.

There is no action without an actor. That actor is an identity.


The Three Building Blocks

Flow diagram: User (shekhar) → belongs to Group (developers) → has Permission (read/write) → accesses Resource (project files)
The universal identity model: Users belong to Groups, Groups hold Permissions, Permissions control access to Resources.

1. Users — The Individual Identity

A user is a unique named identity, represented by two things:

  • A username (human-readable): shekhar, root, www-data
  • A UID (User ID): a unique number the OS actually uses. shekhar might be UID 1001. root is always UID 0.
shekhar = the name YOU see
1001    = the number the COMPUTER sees
The Root User (UID 0) is Special

root is the superuser. UID 0. The master key.

Root can do anything: read any file, kill any process, delete the entire OS.

The first rule of being a SysAdmin: never work as root unless absolutely necessary. Use it → do the task → exit. Treat it like live electricity.

2. Groups — The Team Identity

A group is a collection of users. Instead of setting permissions for every user individually, you set them for a group — and every user in the group automatically inherits those permissions.

Real-world example:

  • Group developers → has read/write access to /var/www/html
  • You add alice, bob, and charlie to the developers group
  • All three can now edit the website — without touching individual permissions

This is exactly how companies manage access: “Add them to the marketing group” means they instantly get all marketing system permissions.

3. Permissions — The Rules

A permission is a rule that says: “What can this identity DO with this resource?”

The classic Linux permission model answers three questions:

  • Who? — User (owner), Group, or Others (everyone else)
  • What? — Read (r), Write (w), Execute (x)
  • To what? — A file, directory, or device
-rwxr-xr--
 │││└─ Others: read only
 │││
 ││└── Group: read and execute
 ││
 │└─── Owner: read, write, execute

 └──── File type (- = regular file)

This Model Is Everywhere

Here’s the important realization: you will see this same model in every IT environment you ever work in — just with different names:

Table comparing Linux, Windows, and AWS implementations of the same Users/Groups/Permissions/Superuser model
The same identity model appears in every environment — the names change, the concept doesn't.
ConceptLinuxWindows / ADAWS IAM
UserLinux user (useradd)AD User AccountIAM User
GroupLinux group (groupadd)AD Security GroupIAM Group
Permissionchmod, file permissionsNTFS permissions, GPOIAM Policy (JSON)
Superuserroot (UID 0)Administrator / Domain AdminRoot Account + Admin Role
User Database/etc/passwd + /etc/shadowActive Directory (LDAP)IAM User List
Service Accountwww-data, mysql userService AccountIAM Role (for EC2, Lambda)
Why This Matters for Your Career

When your manager says “add him to the AD security group”, they mean the same thing as “add him to the Linux group” — just on a Windows domain.

When AWS says “attach this IAM policy”, they mean the same thing as chmod on Linux — just in JSON.

One concept. Infinite environments.


Hands-On: Discover Your Own Identity

Right now, on your Linux or macOS machine, you have an identity. Let’s look at it.

Step 1: See who you are

whoami

Print your current username — the identity you're running as

beginner
  • This shows the username of the current session
  • If you ran 'sudo su' earlier, this might show 'root'
  • Always good to check before running dangerous commands

Step 2: See your full identity (UID, GID, all groups)

id

Show your full identity: UID, primary GID, and all group memberships

beginner
  • uid=1000(shekhar) — your User ID and username
  • gid=1000(shekhar) — your primary Group ID
  • groups= — every group you're a member of. This determines all your permissions.
  • If you see 'sudo' in your groups list, you can run commands as root

Step 3: See what groups a user belongs to

groups shekhar

List all groups that the user 'shekhar' belongs to (replace with any username)

beginner
  • Each group name represents a set of permissions
  • 'sudo' group = can use sudo
  • 'docker' group = can run Docker commands without sudo
  • 'www-data' group = can modify web server files

Step 4: View all users on the system

cat /etc/passwd | cut -d: -f1,3,7

Show all users, their UIDs, and their login shell (or /usr/sbin/nologin for service accounts)

beginner
  • Users with /usr/sbin/nologin or /bin/false are service accounts — they can't log in interactively
  • UIDs 0-999 are typically system/service accounts
  • UIDs 1000+ are typically real human users
  • The 'nobody' user (UID 65534) is used when minimal permissions are needed

Hands-On Challenge

Try this sequence on your own Linux system:

  1. Run whoami — note your username
  2. Run id — find your UID and list your groups
  3. Run cat /etc/passwd | grep your-username — see your full user entry
  4. Run ls -la /home/ — notice how each home directory is owned by a different user
  5. Bonus: Run sudo cat /etc/shadow — this is where hashed passwords are stored. Only root can read it. This is the permission system protecting your passwords.

Key Takeaways

  1. An identity is anything that takes an action — humans, services, programs, cloud resources.
  2. Every user has a UID — the computer uses numbers, not names.
  3. Groups let you manage permissions at scale — set it once, it applies to everyone in the group.
  4. The model is universal — Linux users/groups, Windows AD, AWS IAM — same foundation, different syntax.
  5. Root (UID 0) is the master key — treat it like live electricity. Use when needed, exit immediately after.
  6. Every running process inherits an identitynginx isn’t “just running”, it runs AS www-data.
You Now Know

The mental model that powers 100% of IT access control — from your home PC login screen to AWS IAM policies managing billion-dollar infrastructure. The same Users → Groups → Permissions → Resources pattern appears everywhere.

Next Steps in This Series

🧠

Test Your Knowledge

Take a quick 5-question quiz to check your understanding.

📧

Get weekly IT guides

Join 5,000+ IT professionals

Subscribe Free
Type to start searching...