|
Group Management
Managing groups is accomplished with the groupadd, groupmod, and groupdel commands on most Unix systems. groupadd has this syntax: groupadd -g group_id group_name
To create a new group for the finance department called finance_2 and assign it a unique GID of 535, for example, you’d use: groupadd -g 535 finance_2 This command makes the appropriate entry in the /etc/group
file.
To modify a group, use the groupmod syntax: groupmod -n new_modified_group_name old_group_name
To change the finance_2 group name to financial, type: groupmod -n financial finance_2 You can also use the -g option with groupmod to change the GID of the group. Here’s how you’d change the financial GID to 545: groupmod -g 545 financial
To delete an existing group, all you need are the groupdel command and the group name. To delete the financial group, the command is: groupdel financial This removes only the group,not any files associated with that group. (The files are still accessible by their owners.) |
|
See Also
Have a Unix Problem
Return to : - Unix System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|