🐧
Linux
  • syllabus
  • unit 1-Introduction
    • Unit I: Introduction to Linux
    • 2. Advantages of Linux over other operating systems
    • 3.File systems
    • 4.Culture of free software
  • unit 2-Basics of Linux
    • 1.Commands
    • 2.shell
    • 3.Text Editors
    • 4.The file system of Linux
    • 5.Directories and their special purpose
    • 6.permission
  • unit 3-Installation
    • 1. Partitioning
    • 2. Installation of Linux
    • 3. Troubleshooting of installation
  • unit 4-System Administration
    • 1.Root login
    • 2.Superuser
    • 3.Configuration of hardware with kudzu
    • 4. Checking System Space:
    • 5. Monitoring System Performance:
    • 6. Working with a File System:
    • 7.Configuring modules
    • 8.jail shell
    • 9.awk
    • 10.sed
  • unit 5-User Management
    • 1.Creating user accounts
    • 2.Setting user defaults
    • 3.Providing support to users
    • 4.Modifying accounts
    • 5.Deleting user accounts
    • 6.Checking disk quotas
    • 7.Sending mail to all users
  • unit 6-Security and System Handling
    • 1.Understanding shell scripts
    • 2.System startup and shutdown
    • 3.Scheduling system tasks
    • 4.Backing up and restoring
    • 5.Password protection
    • 6.File security
  • unit 7-Setting up a Web Server
    • 1.Introduction to a web server
    • 2.Starting the Apache webserver
    • 3.Configuring the Apache webserver
    • 4.Monitoring server activities
  • unit 8-Setting up DHCP and NIS
    • 1.Introduction to DHCP
    • 2.Setting up DHCP Server
    • 3.Setting up DHCP Client
    • 4.Understand NIS
  • unit 9-Setting up a Database Server
    • 1.Configuring database server
    • 2.Checking the status
    • 3.Working with database
  • unit 10-Setting up DNS
    • 1.Introduction to DNS
    • 2.Setting up DNS and configuration
    • 3.Querying DNS
  • unit 11-ISP Simulation
    • 1.Integration of servers
    • 2.DNS, Web, Email, etc
  • fullform
  • Assignment
  • Practicals
    • 1.Linux utilities
    • 2.OS installation project work
    • 3.User management using a terminal
    • 4.Security level access control list
    • 1.Network setting
    • 2.Server configuration of DHCP, DNS, Database server
    • 3.Demonstration of the web, mail, file server
  • imp questions
    • short-notes
    • unit 1
    • unit 2
    • unit 3
    • unit 4
    • unit 5
    • unit 6
    • unit 7
    • unit 8
    • unit 9
    • unit 10
    • unit 11
    • unit ii
  • services
    • create_service
  • Viva+Practical
    • VIVA questions
    • Practical questions
Powered by GitBook
On this page

Was this helpful?

  1. unit 5-User Management

1.Creating user accounts

Creating a new user account in a Linux operating system involves several steps, including user creation, specifying user details, setting a password, and configuring user permissions.

Note: The following instructions are for systems using the useradd and passwd commands, which are common in many Linux distributions. Some distributions may use different tools or have graphical user interfaces for user management.

  1. Open a Terminal:

    • To create a new user account, open a terminal on your Linux system. You will need superuser (root) privileges to create a new user.

  2. Create the User:

    • Use the useradd command to create a new user. Replace new_username with the desired username.

    sudo useradd new_username

    This command creates a new user account with default settings. The user's home directory will typically be created in /home/new_username.

  3. Set User Details:

    • You can specify additional user details, such as the user's full name and contact information, using the useradd command with the -c option.

    sudo useradd -c "Full Name" new_username

    Replace "Full Name" with the user's actual full name.

  4. Set Password:

    • To set a password for the new user, use the passwd command.

    sudo passwd new_username

    You will be prompted to enter and confirm the user's password. Make sure to choose a strong password.

  5. Assign User to Groups (Optional):

    • By default, a new user is placed in a group with the same name as the username. You can add the user to additional groups using the usermod command.

    sudo usermod -aG groupname new_username

    Replace groupname with the name of the group you want to add the user to.

  6. Verify User Creation:

    • You can use the id command to verify that the user has been created and to check their group memberships.

    id new_username
  7. Set Home Directory Permissions (Optional):

    • By default, the user's home directory is created with appropriate permissions. However, if you need to modify permissions or ownership, you can use the chown and chmod commands.

    sudo chown new_username:new_username /home/new_username

    This command changes the owner and group of the user's home directory to match the username.

    sudo chmod 700 /home/new_username

    This command sets strict permissions on the user's home directory, allowing only the user to read, write, and execute files within it.

  8. Log In as the New User:

    • To test the new user account, you can switch to the user's session using the su (substitute user) command.

    su - new_username

    You will be prompted to enter the user's password.

  9. (Optional) Grant Administrative Privileges (sudo):

    • If you want the new user to have administrative privileges, you can add them to the sudo group. This allows the user to execute commands with superuser privileges using sudo.

    sudo usermod -aG sudo new_username

    This step is optional and should be done with caution. Only grant sudo access to trusted users who need it.

  10. Logout and Log In:

    • After creating the user account and configuring permissions, it's a good practice to log out and log in as the new user to ensure everything is working as expected.

Previousunit 5-User ManagementNext2.Setting user defaults

Last updated 1 year ago

Was this helpful?