Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
    • Security
Google Cloud Platform icon
Labs

Linux User Management: Working with Secondary Groups

Often, Linux users require membership to multiple groups to gain the access required on the system. In this lab exercise, we will create two new groups, and create three users with access to both groups. We will then create two directories and files within them to ensure all users have read/write access to both directories.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Beginner
Last updated
Apr 07, 2025
Duration
30m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Create the appadm Group with GID 30000 and the dba Group with GID 40000
    # groupadd -g 30000 appadm
    # groupadd -g 40000 dba
    
  2. Challenge

    Create Users user1, user2, and user3 with a Primary Group of appadm and a Secondary Group of dba
    # useradd -g appadm -G dba user1
    # useradd -g appadm -G dba user2
    # useradd -g appadm -G dba user3
    
  3. Challenge

    Create the /app Directory and Give the appadm Group Read/Write Access, Then Create the /db Directory and Give the dba Group Read/Write Access
    # mkdir /app
    # chgrp app/adm /app
    # chmod 760 /app
    # mkdir /db
    # chgrp dba /db
    # chmod 760 /db
    
  4. Challenge

    Create the File /app/adm/app1.conf Containing the Comment “This file is reserved for application configuration.” and Grant the appadm Group Read/Write Permission to the File
    # echo “This file is reserved for application configuration.” > /app/app1.conf
    # chgrp appadm /app/app1.conf
    # chmod 760 /app/app1.conf
    
  5. Challenge

    Create a File Named /db/db1.conf Containing the Comment, "This file is reserved for database configuration." Grant the dba Group Read/Write Access to the File
    # echo "This file is reserved for database configuration." > /db/db1.conf
    # chgrp dba /db/db1.conf
    # chmod 760 /db/db1.conf
    
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight