Jump to Navigation

148 - Create Linux User

  • Create a general User

# /user/sbin/adduser -g <Groups > -d <Home Directory> -s <Shell> <User Name>

# /user/sbin/adduser -d /home/user1 -g users -s /bin/bash user1

  • Create a user who can not login with SSH
# /usr/sbin/adduser -g <Groups> -d <Home> -s /sbin/nologin <User Name>
  • Check the user & group

# finger <User Name>

# groups <User Name>

  • Delete a user
# /user/sbin/userdel -r <User Name>
  • Add a gruop to a user
# /user/sbin/usermod -G <Group> <User Name>
  • Add existing < user > to ftp supplementary/secondary group with usermod command using -a option.
    Add the user to the supplemental group(s). Use only with -G option.
# usermod -a -G ftp <user>

 

Linux:


Main menu 2

Story | by Dr. Radut