View Single Post

  #5 (permalink)  
Old 05-19-2008, 01:01 AM
rockdalinux's Avatar
rockdalinux rockdalinux is offline
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 557
Rep Power: 6
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

Try
Code:
 id -G -n username
The -G will print all group IDs and -n will print in human readable format.

Here is an example:
Code:
useradd rocky
id -Gn rocky
Create a secondary group called ftp
Code:
groupadd ftp
Add rocky to secondary group called ftp
Code:
usermod -a -G ftp rocky
Now print all membeship
Code:
id -Gn rocky
You should see rocky as primary and ftp as secondary group.
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat

Last edited by rockdalinux; 05-19-2008 at 01:05 AM.
Reply With Quote