How to Manage Users in Linux

Method 1 of 4:

Adding Users

  1. How to Manage Users in Linux Picture 1
    Type adduser -d /home/users/ into the command line.
    1. Example: adduser bob -d /home/users/bob
  2. How to Manage Users in Linux Picture 2
    Type passwd and press return to set a password for the new user.
    1. Type the new password.
    2. Confirm the password.
Method 2 of 4:

Modifying Users

Changing Passwords

  1. How to Manage Users in Linux Picture 3
    Type passwd in the command line.
  2. How to Manage Users in Linux Picture 4
    Enter the new password for the user.
    1. Note: the cursor will not move however your password is being typed.
  3. How to Manage Users in Linux Picture 5
    Confirm the new password.
Method 3 of 4:

Removing Users

  1. How to Manage Users in Linux Picture 6
    Type userdel into the command line to delete a user.
    1. Example: userdel bob
  2. How to Manage Users in Linux Picture 7
    Type userdel -r to also delete their home folder and files.
Method 4 of 4:

Sudo and Su

Terms

  1. sudo: Switch User and Do
    1. Executes a command as root or another use while maintaining your current session.
  2. su: Switch User
    1. Switches your session to another user.
      How to Manage Users in Linux Picture 8

Usage

  1. How to Manage Users in Linux Picture 9
    Type sudo before a command to execute the command as the root user. You will be prompted for a password.
    1. Example: sudo apt-get install telnet
  2. How to Manage Users in Linux Picture 10
    Type sudo before a command to execute the command as another user on the system. You will be promoted for that users password.
    1. Example: sudo bob telnet localhost 22
  3. How to Manage Users in Linux Picture 11
    Type su to switch your command line session to the root user. You will be promoted for a password.
    1. Type logout to switch back.
  4. How to Manage Users in Linux Picture 12
    Type su to switch your command line session to another user. You will be promoted for their password.
    1. Type logout to switch back.
5 ★ | 1 Vote

May be interested

  • How to manage packages on RPM-based Linux distributions with DNFHow to manage packages on RPM-based Linux distributions with DNF
    this tutorial will show you how to install and manage software packages on rpm-based linux distributions like fedora and red hat enterprise linux (rhel) using dnf.
  • How to Launch Programs from Command Line on LinuxHow to Launch Programs from Command Line on Linux
    most linux distributions have a graphical user interface that allows us to open programs just by clicking on the program icon in the apps menu. however, sometimes you may want to launch programs from terminal. terminal is a powerful tool that allows users to launch programs and manage linux systems through keyboard commands. today's tipsmake will show you how to launch programs from terminal on linux.
  • 9 most popular Linux package managers today9 most popular Linux package managers today
    the common point between all linux distributions is that they need to be able to install new software packages into the system. various package managers are available, allowing users to install, manage and delete packages easily and quickly.
  • 7 ways to run Linux software on Windows7 ways to run Linux software on Windows
    linux users want to run windows software on linux, whereas windows users want to use linux software. even if you are looking for a better development environment, more powerful command-line tools, you can run linux software without removing windows.
  • How to check and manage disk space in LinuxHow to check and manage disk space in Linux
    a common problem is that updates fail due to a lack of disk space, but there are some simple tests that users can perform when they encounter an error message, to keep critical systems smooth operation.
  • How to find, set and change IP addresses on LinuxHow to find, set and change IP addresses on Linux
    ip address is like a computer phone number. computers use it to communicate with other devices and vice versa. here are some simple ways to manage ip addresses on linux.
  • 5 best Linux distributions for Windows users5 best Linux distributions for Windows users
    in this article, tipsmake.com will introduce you to the best linux distributions for those who have just converted from the windows environment.
  • 6 best Linux distributions for Windows users6 best Linux distributions for Windows users
    linux is the most known and used open source operating system. whether you are looking for a suitable operating system for your laptop, workstation, desktop, gaming, a/v editing or server, you will always find the right linux distribution for your needs. your specific needs.
  • How to Learn LinuxHow to Learn Linux
    learning linux is not a one day task but it isn't herculean either. linux can be a good and safe os for both home and enterprise level users. keep in mind before saying 'hey, i'm going to start working on linux from tomorrow' that there is...
  • 8 best Linux distros for pentest8 best Linux distros for pentest
    linux users have a lot of free operating systems to choose from when it comes to pentests. if you're a linux user, it's time to check out some of these cybersecurity-related linux distributions.