Kali, Kernal, Linux, Linux commands, security

LINUX(For Beginners) EP-2

Managing Users and Groups in Linux:

Every computer system, including Linux, has users. Yes, you read that right; you are a user too! In this blog post, we’ll dive into the fascinating world of Linux users and groups and explore how you can manage them like a true superhero.

Adding a User

Adding a user to your Linux system is a straightforward process, but there’s a catch. Only the all-powerful ‘root’ user can add new users.

However, before we add our new user, let’s take a moment to understand who or what ‘root’ is. ‘root’ is another user on your system, but it holds superuser privileges. To add a user, we need to use ‘sudo‘ which stands for “superuser do.”

your new user has been added to the system. But where can you find all the users on your Linux machine? You can check by using the following command:

You can see User with the name “david”. the ‘x’ you see under the ‘User’ column represents the password. The actual passwords are stored in /etc/shadow and are hidden from view.

To get more information about users, you can check /etc/shadow. Additionally, you’ll notice two numbers associated with each user: the User ID (UID) and the Group ID (GID). When you create a user in Linux, it automatically creates a user and a group with the same name.

Customizing User

Linux gives us the flexibility to customize user properties. For example, we can change the shell assigned to a user by using the following command:

To change the username itself:

You can also perform more advanced user modifications using

Managing Groups

Linux also allows you to create and manage groups. To create a new group, use the following command:

To view all the groups on your system:

But what’s the use of a group without power? To grant superpowers to a group, add it to the sudoers file:

Open sudoiers file by following command:

Add the following line to give the group unlimited power:

%groupname ALL = NOPASSWD:ALL

Now, any member of that group can execute superuser commands without a password prompt.

Adding Users to Groups

The real fun begins when you start adding users to groups. Use this command to add a user to a group:

The -aG flag appends the user to the specified group, while ensuring they remain members of their existing groups.

Removing Users from Groups

To remove a user from a group:

Deleting Users and Groups

Finally, when you’re done with a user, you can delete them using:

And to delete a group:

In the world of Linux, managing users and groups is crucial for system security and organization. With these commands at your fingertips, you can wield the power of the gauntlet and make your Linux system dance to your tune.

Kernal, Linux, Linux commands

LINUX(For Beginners)

Introduction:

In the world of operating systems, Linux stands tall as an open-source (open and free to use) powerhouse. With its flexibility, security, and diverse community, Linux has become a prominent player in both personal and enterprise computing.

The Linux terminal stands as a powerful gateway to the heart of your operating system. Unlike the graphical user interface (GUI), where your current location is visually apparent, the terminal requires a different approach, This is where the pwd (present working directory) command comes into play.

So I’m right here in home/kali directory.

If you want to see stuff in your current working directory for that there is a command

ls(list) it just list the content of your current working directory.

Let say if you want to go inside in Desktop directory we have a cd(change directory) command.

In the next blog we’ll talk about linux file system. See you in the next blog as we continue our Linux adventure!