Primary vs Secondary groups

Also, on some unix systems, look at the useradd command. Check the difference between -G=secondary groups and -g= primary group. With regards to groups, they are a different thing from ACLs. With the primary vs secondary groups. Say you work in the hr dept and you are a lead that needs access to financial data from the accounts dept and information service dept. Since most of the resources you will be accessing are hr related, that will be your primary group. You will be added to the accounts dept and info service dept as your secondary groups, so that you can have rights / privileges to those resources too. The command on linux systems is as follows:

useradd -m -d /export/home/Nick -g hr -G accounts information service -p **** -s/bin/shell Nick
  • -m = make
  • -d = directory This is the users home directory
  • -g= primary group
  • -G= secondary groups
  • -p= password
  • -s= starting shell program

After creating a user and their associated groups, you can use the usermod command to modify some or all of these attributes.

technology/unix/primary_vs_secondary_groups.txt · Last modified: 01.25.2009 12:29 by
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki