Tech > LinuxGroups

Linux Groups


Switching groups

  • newgrp groupname

Check current group

Shows the currently assigned group for the current logged on user

  • id

setgid bit on Directories

  • chmod g+s mydir or
  • chmod 2775 mydir

Files created in mydir will have their group set to that of the directory's group.

Add user to group

  • /usr/bin/gpasswd -a loginname groupname

umask

Default for all users set in /etc/profile. (Might be in /etc/bashrc)

  • umask 002

Password Aging

Turn off and disable password aging

  • chage -m -1 -M -1 -W -1 -I 0 -E 2999-12-31 username

-- Frank Dean - 22 Dec 2002