WebSphere Issues

20/04/2017

User and group management in Linux

Filed under: Other — Ishtiaque @ 11:37 am

User commands:

  • useradd user1 (-d /var/user1 changes home directory)
  • userdel -r user1 (removes user and its home/mail folders)
  • usermod -a -G grp1, grp2 user1 (Adds users to grp1 and grp2)
  • chage -l user1 (List user details)
  • Files: /etc/passwd and /etc/shadow
  • cut -f 1,6 -d “:” /etc/passwd (List all users and their home directory)

Group commands:

  • groupadd grp1
  • groupdel grp1
  • groupmod
  • groups user1 OR id -Gn (List groups of a user)
  • /etc/group and /etc/gshadow
Advertisements

Blog at WordPress.com.

%d bloggers like this: