LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   group assignment (https://www.linuxquestions.org/questions/linux-newbie-8/group-assignment-4175465760/)

vignesh_murali2003 06-12-2013 02:59 PM

group assignment
 
hi everyone,
I would like to add 'user1' to the group 'users'.
When i give command 'useradd -G users user1' it says the user already exists. But apparently it doesnt showup when i give the command 'id user1'

TB0ne 06-12-2013 03:14 PM

Quote:

Originally Posted by vignesh_murali2003 (Post 4970515)
hi everyone,
I would like to add 'user1' to the group 'users'.
When i give command 'useradd -G users user1' it says the user already exists. But apparently it doesnt showup when i give the command 'id user1'

If you want to add an existing user to an existing group, you would use "usermod". useradd is to add a totally new user to the system.

vignesh_murali2003 06-12-2013 03:26 PM

I would like to give 'test1' access to group 'testgroup'. The permissions of the 'testgroup' are 750 and the owner is root:users. I also added 'test1' to the group 'users' . But when I set permissions to 755 everything is fine. Probably it detects other rather than group.

TB0ne 06-12-2013 03:31 PM

Quote:

Originally Posted by vignesh_murali2003 (Post 4970535)
I would like to give 'test1' access to group 'testgroup'. The permissions of the 'testgroup' are 750 and the owner is root:users. I also added 'test1' to the group 'users' . But when I set permissions to 755 everything is fine. Probably it detects other rather than group.

Can't follow what you're saying. Groups do not HAVE permissions...directories/files do. And what is 'test1' in this case? A user? And have you read anything about the basics of Linux file permissions???
http://www.linux.com/learn/tutorials...le-permissions

A directory with permissions of 750, and owned by root:users will not be writable to anyone except root, but readable by members of the users group. Since you haven't added user test1 to the users group, it can't read it.

Again, you need to read the man pages on usermod and useradd first.


All times are GMT -5. The time now is 10:57 AM.