<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Karunavikascloud on Medium]]></title>
        <description><![CDATA[Stories by Karunavikascloud on Medium]]></description>
        <link>https://medium.com/@karunavikascloud?source=rss-97b125969e60------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*0rmLW95C_ticKrL1</url>
            <title>Stories by Karunavikascloud on Medium</title>
            <link>https://medium.com/@karunavikascloud?source=rss-97b125969e60------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 06:42:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@karunavikascloud/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Linux Users and Groups]]></title>
            <link>https://medium.com/@karunavikascloud/linux-users-and-groups-36428c2ad415?source=rss-97b125969e60------2</link>
            <guid isPermaLink="false">https://medium.com/p/36428c2ad415</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[users-and-groups]]></category>
            <dc:creator><![CDATA[Karunavikascloud]]></dc:creator>
            <pubDate>Wed, 10 Jun 2026 16:27:09 GMT</pubDate>
            <atom:updated>2026-06-10T16:27:09.905Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LKzqxJzBglJGrJtD" /></figure><p><strong>Linux Users and Groups</strong></p><p>Welcome to the world of Linux! Think of a Linux operating system like a large, secure apartment building. To keep everything safe and organized, the building needs rules: who lives there, which apartments they can enter, and what they are allowed to do.</p><p>In Linux, we manage this using Users and Groups. Let’s break down how this works using everyday terms.</p><ol><li>The Core Concepts: Who is Who ?<br>Every single file, folder, and program running on a Linux system has an owner.</li></ol><p>What is a User? <br>An individual account on the computer. Just like you have a unique passport number, every user in Linux gets a unique User ID (UID) number.</p><p>What is a Group?<br> A collection of users pooled together. If you want to give five people access to the same project folder, you don’t give permission to each person one by one. Instead, you put them in a “Group” and give the permission to that group. Every group gets a Group ID (GID).</p><p>Privacy by Default: Users cannot read, write, or change each other’s files unless they are explicitly given permission.</p><p>2. Where Linux Stores This Information<br>Linux keeps track of its “apartment residents” in specific system files. You can think of these as the building’s registration logs.</p><p>The Resident Registry (/etc/passwd)<br>This file contains a list of all user accounts on the system. If you look inside this file, a typical line looks like this:</p><pre>root : x : 0 : 0 : root : /root : /bin/bash</pre><p>Here is what that coded line actually means, broken down step-by-step:</p><p>root: The username (the “system administrator” or landlord account).</p><p>x: Means the password is encrypted and safely hidden away in another file.</p><p>0: The User ID (UID). The system administrator is always 0.</p><p>0: The Group ID (GID).</p><p>root: A description or comment about the user.</p><p>/root: The user’s “Home Directory” (their private apartment folder).</p><p>/bin/bash: The “Login Shell” (the command-line interface program they use to talk to the computer).</p><p>The Secret Vault (/etc/shadow)<br>Because the registry file can be read by anyone, Linux stores users’ actual passwords in a separate, highly secure file called (/etc/shadow). The passwords are encrypted (scrambled into random text) so no one can steal them.</p><p>3. Managing Users and Groups (The Commands)<br>To manage our “building,” we use specific commands. Note: Only the system administrator (root user) is allowed to use most of these commands.</p><p>Creating New Accounts</p><pre>useradd ansible</pre><p>Creates a new user account named “ansible”.</p><pre>groupadd devops</pre><p>Creates a new group named “devops”.</p><p>What is a User Private Group (UPG)?</p><p>When you create a new user (like ansible), modern Linux systems automatically create a group with the exact same name (ansible) and make that user the only member. This makes managing file permissions much simpler later on.</p><p>Modifying and Assigning Groups</p><p>If you want to add a user to a group, you use the usermod (user modification) command:</p><pre>usermod -aG devops ansible</pre><p>This takes the user ansible and Adds (-a) them to the Group (-G) called devops.</p><p>Alternatively, advanced administrators sometimes skip the command and open the /etc/group file with a text editor (like vim) to manually type a user’s name next to a group.</p><p>Setting Passwords<br>A user account cannot be logged into normally until it has a password.</p><p>passwd ansible: Type this, and the system will prompt you to enter and confirm a new password for the user “ansible”.</p><p>4. Checking and Switching Users<br>Who is in the System?<br>id vagrant: Shows the identity details of the user “vagrant” (their UID, their primary group, and any other groups they belong to).</p><p><strong>who</strong>: Shows a list of users who are currently logged into the system right now.</p><p><strong>last</strong>: Displays a history log of who logged into the system recently and at what time.</p><p><strong>lsof -u ansible</strong>: Short for “List Open Files”. This shows exactly what files the user “ansible” is currently using or viewing.</p><p>Switching Accounts<br>su — ansible: Short for “Switch User”. This lets you temporarily switch from your account into the “ansible” user account.</p><p>5. Evicting Users (Deleting Accounts)<br>When someone leaves the organization, you need to remove their account.</p><p>The Gentle Way (userdel aws): This deletes the user account “aws”, but it leaves their files and home folder intact on the hard drive just in case you need to recover their work later.</p><p>The Total Wipeout (userdel -r jenkins): The -r stands for “remove”. This deletes the user “jenkins” and completely erases their home folder and personal files from the computer.</p><p>Deleting Groups (groupdel devops): Completely removes the “devops” group from the system.</p><p><strong>Note:</strong></p><p>While typing the above commands if you face any permission denied errors, use <strong>sudo</strong> before every command to make it as root users commands.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36428c2ad415" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>