how can i add a user to a group


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers how can i add a user to a group
# 1  
Old 01-25-2008
how can i add a user to a group

All,

How i can add a user to a group so that the user will ahve all permsion on that directory .

(sys12Smilienl:/work/cn/>) groups crcv1
canusr

and

(sys12Smilienl:/work/cn/>) groups pfmgr
pfw users

i am having the .ssh in the directory /work/cn/ which has permision as drwx------ .

My code is running as pfmgr . So when my code try to find the directory .ssh it fails with permision no permision to read .

If i add canusr to my group pfmgr . Will my code will have permission to .ssh file ?? .

Again how i add canusr to my group pfmgr . Please let me know .

Thanks,
Arun
# 2  
Old 01-25-2008
check the "usermod" command, with "-g" option to add a primary group, and "-G" to add secondary group:
Code:
#usermod -g group username

or maybe you can edit the /etc/passwd if you know how to.

Regards
Aladdi
# 3  
Old 06-14-2008
Question

Hello...

What is the difference between a primary and secondary group for an user?

Thanks,

FernandaSmilie
# 4  
Old 06-15-2008
Primary Versus Secondary Groups
One final note on groups is that it is important to understand the difference between the primary and secondary group. A user can only be a member of one primary group. The primary group is the group that any files they create will belong to by default. However, a user can be a member of multiple secondary groups.

The primary group is the one that is listed in the /etc/passwd file along with the user's entry. Any other group that the user is a member of in /etc/group is considered to be a secondary group.
# 5  
Old 06-15-2008
Question

be a member of a secondary group means that this user will have same privileges that users in this group?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. SuSE

How to add a new user to sudo group in openSuse 12.3?

Hi All, I have created a openSUSE 12.3 VM in my VirtualBox. I have created one user and added that user to my group. Is there any command by which I can add that user to sudoers user group like we do in ubuntu? #sudo adduser user1 sudo I checked the /etc/groups file, but there is no sudo... (1 Reply)
Discussion started by: sanzee007
1 Replies

2. Linux

Openldap add user to secondary group

Hello, i try to add user john to secondary group, named groupB this will add as primary group, how can i add to secondary group?? dn: cn=groupB,ou=Groups,dc=ldap-server,dc=com changetype: modify add: memberuid memberuid: john (1 Reply)
Discussion started by: prpkrk
1 Replies

3. Red Hat

User is a Part of a Group But Group Details Do Not Show the User

Hi, In the following output you can see the the user "richard" is a member on the team/group "developers": # id richard uid=10247(richard) gid=100361(developers) groups=100361(developers),10053(testers) but in the following details of the said group (developers), the said user... (3 Replies)
Discussion started by: indiansoil
3 Replies

4. Debian

Group/User

Can someone help in creating a group and user. syntax to create a Group called Members. syntax to create a user called AAAA and place in to the Group Members. Thanks for your help in Advance. (3 Replies)
Discussion started by: sawyer
3 Replies

5. Ubuntu

Create New User with the same group nd privileges of the other user

Hi, Anyone can help me on how to duplicate privileges and group for useroradb01 to userrootdb01. I have currently using "useroradb01" and create a newly user "userrootdb01". I want both in the sames privileges and group. Please see the existing users list below; drwxr-xr-x 53 useroradb01... (0 Replies)
Discussion started by: fspalero
0 Replies

6. AIX

How to create new user and add group

Hello, I am new in AIX please tell how can i create user and add group in this user for example, i want to create user umair and want to add this user primanry group DBA and secondary group ORACLE,how can i do this please tell in detail Thanks, Umair (1 Reply)
Discussion started by: umair
1 Replies

7. Shell Programming and Scripting

Merge group numbers and add a column containing group names

Hi All I do have a file like this with 6 columns. Groups of data merge together and the group number is indicated above each group. 1 1 12 26 289 3.2e-027 GCGTATGGCGGC 2 12 26 215 6.7e+006 TTCCACCTTTTG 3 9 26 175 ... (1 Reply)
Discussion started by: Lucky Ali
1 Replies

8. Shell Programming and Scripting

Merge group numbers and add a column containing group names

I have a file in the following format. Groups of data merge together and the group number is indicated above each group. 1 adrf dfgr dfg 2 dfgr dfgr 3 dfef dfr fd 4 fgrt fgr fgg 5 fgrt fgr (3 Replies)
Discussion started by: Lucky Ali
3 Replies

9. Solaris

Add existing user into an existing group

Pre: no gpasswd/adduser there is just usermod can be used, also there is no -a option for usermod. How should I add a user into a group? (4 Replies)
Discussion started by: a2156z
4 Replies

10. Shell Programming and Scripting

Find all files with group read OR group write OR user write permission

I need to find all the files that have group Read or Write permission or files that have user write permission. This is what I have so far: find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}' It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies
Login or Register to Ask a Question