DEV Community

Manoj sai Challagulla
Manoj sai Challagulla

Posted on

USERS AND GROUPS IN WINDOWS

First Principle

A User and a Group are different things.

Think of a college.

Students

Manoj
Rahul
Priya

These are people.

Groups

Students
Faculty
Principal
Enter fullscreen mode Exit fullscreen mode

These are roles.

A person can belong to one or more groups.

Example:

Manoj
└── Students

Enter fullscreen mode Exit fullscreen mode
Principal
└── Faculty
└── Management
Enter fullscreen mode Exit fullscreen mode

Windows works exactly the same way.

Windows Internal Structure

When you create:


manoj
Enter fullscreen mode Exit fullscreen mode

Windows only creates an identity.

At this point Windows knows:

User Name = manoj
SID = S-1-5-21-xxxx...
Enter fullscreen mode Exit fullscreen mode

SID = Security Identifier.

Internally Windows doesn't really care about the name.

It identifies users by SID.

Why Groups Exist

Imagine Windows had 1000 users.

Without groups Microsoft would have to store permissions separately for every user.

Example:

Manoj -> Can install software
Rahul -> Can install software
Priya -> Can install software
John -> Can install software
Enter fullscreen mode Exit fullscreen mode

That's inefficient.

Instead:

Administrators
    ├── Manoj
    ├── Rahul
    ├── Priya
    └── John
Enter fullscreen mode Exit fullscreen mode

Now Windows says:

Anyone inside Administrators
gets these permissions.
Enter fullscreen mode Exit fullscreen mode

Much easier.

Common Windows Groups

Run:

net localgroup
Enter fullscreen mode Exit fullscreen mode

You'll see many groups.

The important ones are:

Administrators

Most powerful group.

Members can:

✅ Install software

✅ Create users

✅ Delete users

✅ Access all files

✅ Change passwords

✅ Install drivers

✅ Change system settings

Example:

Administrators
├── Administrator
└── thriv
Enter fullscreen mode Exit fullscreen mode

Users

Default group.

Almost everyone belongs here.

Can:

✅ Use apps

✅ Browse internet

✅ Save files

Cannot:

❌ Create users

❌ Install drivers

❌ Change system security

Guests
Enter fullscreen mode Exit fullscreen mode

Temporary users.

Very limited access.

Example:

Someone borrows your laptop.

You don't want them accessing your files.

Create Guest account.

Remote Desktop Users

Can log into the computer remotely.

Example:

Remote Desktop Users
└── Manoj
Enter fullscreen mode Exit fullscreen mode

Now Manoj can connect using Remote Desktop.

What Happens During Login?

Suppose:

User = manoj

Windows checks:

Which groups does manoj belong to?

Maybe:

manoj
├── Users
└── Administrators
Enter fullscreen mode Exit fullscreen mode

Windows loads permissions from both groups.

Result:

manoj gets admin rights
Permission Calculation
Enter fullscreen mode Exit fullscreen mode

Suppose:

Administrators
Enter fullscreen mode Exit fullscreen mode

has:

Install Software
Delete Users
Change Settings
Enter fullscreen mode Exit fullscreen mode

And:

Users
Enter fullscreen mode Exit fullscreen mode

has:

Run Programs
Save Files
Enter fullscreen mode Exit fullscreen mode

If Manoj belongs to both:

manoj
├── Users
└── Administrators
Enter fullscreen mode Exit fullscreen mode

Then Manoj gets:

Run Programs
Save Files
Install Software
Delete Users
Change Settings
Enter fullscreen mode Exit fullscreen mode

Windows combines permissions.

Real Example From Your Laptop

Earlier:

net localgroup Administrators
Enter fullscreen mode Exit fullscreen mode

showed:

Administrator
thriv
Enter fullscreen mode Exit fullscreen mode

Meaning:

thriv
└── Administrators
Enter fullscreen mode Exit fullscreen mode

Therefore:

thriv can:
- create users
- delete users
- install software
Enter fullscreen mode Exit fullscreen mode

But:

manoj
Enter fullscreen mode Exit fullscreen mode

was not in that group.

So:

manoj
└── Users
Enter fullscreen mode Exit fullscreen mode

Only normal permissions.

Adding User to Group

This command:

net localgroup Administrators manoj /add
Enter fullscreen mode Exit fullscreen mode

does NOT create a new user.

It simply changes:

Before:

manoj
└── Users

Enter fullscreen mode Exit fullscreen mode

After:

manoj
├── Users
└── Administrators
Enter fullscreen mode Exit fullscreen mode

Now Manoj becomes admin.

Removing User From Group

This command:

net localgroup Administrators manoj /delete
Enter fullscreen mode Exit fullscreen mode

changes:

Before:

manoj
├── Users
└── Administrators
Enter fullscreen mode Exit fullscreen mode

After:

manoj
└── Users
Enter fullscreen mode Exit fullscreen mode

Admin powers gone.

Important Concept: UAC (User Account Control)

You might have noticed:

Even when you're an Administrator, Windows still asks:

Do you want to allow this app to make changes?
Enter fullscreen mode Exit fullscreen mode

Why?

Because Windows doesn't want malware to get full admin power automatically.

So even Admin users run with limited rights initially.

When you click:

Run as Administrator
Enter fullscreen mode Exit fullscreen mode

Windows temporarily gives full admin privileges.

Linux Comparison (Useful for Backend Engineers)

Since you're learning Django and servers:

Windows:

User
↓
Group
↓
Permissions
Enter fullscreen mode Exit fullscreen mode

Linux:

User
↓
Group
↓
Permissions
Enter fullscreen mode Exit fullscreen mode

Exactly the same concept.

Example:

sudo
Enter fullscreen mode Exit fullscreen mode

in Linux is very similar to:

Run as Administrator
Enter fullscreen mode Exit fullscreen mode

in Windows.

Top comments (0)