LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-09-2002, 04:04 PM   #1
doublefailure
Member
 
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747

Rep: Reputation: 30
how can i add a user to a group?


hi..

i'm trying to add user "eugene" to group "apache"
so that i can use emacs as eugene to modify files under /var/www/

i did #chmod -R 775 /var/www
for that purpose

and

[root@eugene var]# usermod -Geugene,usb,apache eugene
[root@eugene var]# groups eugene
eugene : eugene usb apache

[eugene@eugene eugene]$ groups
eugene usb

this is mandrake's bug?

or should i reintiate something the modication takes effect

and file permission 775 for /var/www is ok idea?

thanks
 
Old 07-09-2002, 04:20 PM   #2
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 32
Unix file and diredtory pemissions diffuicult to get a "grep" on. a perm of "7" on a directory is differnect than a "7" on a file. ....

For instance I could give you perms to read, write to a file
in my directroy but you not see it in a "ls" listing

Didn't really answer you question did I
 
Old 07-09-2002, 04:48 PM   #3
biosx
Member
 
Registered: Jul 2002
Location: Chicagoland
Distribution: Gentoo, Ubuntu
Posts: 63

Rep: Reputation: 15
Log in as root and run the usermod command. It lets you configure pretty much everything about a user's account (including groups they are in).

Good luck
 
Old 07-09-2002, 05:12 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
I just usually edit the file /etc/group to add users to a particular group...
 
Old 07-09-2002, 05:18 PM   #5
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 32
Re: how can i add a user to a group?

Quote:
Originally posted by doublefailure
hi..


[root@eugene var]# usermod -Geugene,usb,apache eugene
[root@eugene var]# groups eugene
eugene : eugene usb apache

thanks
Tricky, dang gone your worhless hide, doublefailure already did that

I thinks the problem is with misunderstanding the how permission effect directorys and files differently.
 
Old 07-09-2002, 05:30 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Re: Re: how can i add a user to a group?

Quote:
Originally posted by pickledbeans


Tricky, dang gone your worhless hide, doublefailure already did that
Pickledcucumber,

I was only adding that to let people know you can actually edit the file instead of running it on the command line like Doublefailure did in which he did not edit the actual file.
Its biosx you should complain about if your going to complain since he suggested what doublefailure already did use to mod his user account...
 
Old 07-09-2002, 05:58 PM   #7
doublefailure
Member
 
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747

Original Poster
Rep: Reputation: 30
hi

i did chmod on file too..
cause i gave -R option..

problem is as u can see
[root@eugene var]# usermod -Geugene,usb,apache eugene
[root@eugene var]# groups eugene
eugene : eugene usb apache

[eugene@eugene eugene]$ groups
eugene usb

usermod isn't actually adding eugen to apache group..
...
 
Old 07-09-2002, 06:05 PM   #8
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 32
Ok I think your have an error with you usermod command.
If eugene is an existing account what you should have done
is:
usermod -G apache eugene

Be warned what you have done is given eugene not only
rewrite/write prevs but also exicute prev also?

If you objective is to give eugene prevs on the htdocs direcotory then you may what to create a new group.

If you objective is to give eugene, permissions to start and stop apache, then use sudo:

man sudo
man visudo
man sudoers

Last edited by trickykid; 07-09-2002 at 06:09 PM.
 
Old 07-09-2002, 06:05 PM   #9
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Haha.. so then have you tried to manually add the user to the apache group, editing the file like I suggested ? That should definitely do the job...
 
Old 07-09-2002, 06:17 PM   #10
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Clearly all doublefailure is trying to do is add eugene to the apache group. Edit the file /etc/group and that should add him if you really want to add him to this group.

Is the group apache the group owner of the directory and files within it ??

But again, like pickled said, you can create a new group and make that group the group owner of /var/www which anyone associated with that group would have whatever access you permit them.
 
Old 07-09-2002, 06:24 PM   #11
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 32
What kind of interesting is there doesn't seem to be a command to remove a user from a group ?
 
Old 07-09-2002, 07:18 PM   #12
doublefailure
Member
 
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747

Original Poster
Rep: Reputation: 30
k
then i'll edit files =)

is this a bug by the way?

based on what i read
when u have a user in group eugene, usb

#usermod -Geugene,usb,apache eugene
add eugene to group apache

#usermod -Geugene
delete eugene from group usb
 
Old 07-09-2002, 07:47 PM   #13
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 32
NO this is Unix
 
Old 07-10-2002, 06:45 AM   #14
biosx
Member
 
Registered: Jul 2002
Location: Chicagoland
Distribution: Gentoo, Ubuntu
Posts: 63

Rep: Reputation: 15
I apologize for not seeing the obvious. Please forgive me.
 
Old 07-10-2002, 11:11 AM   #15
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by biosx
I apologize for not seeing the obvious. Please forgive me.
Ahh, don't worry about it, I only brought it up cause we apparently seem to have some picky people on how people reply to help others out...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to list user in Linux box, add an user to a group! steady_lfcfan Linux - Newbie 12 01-27-2013 01:14 PM
how to add a user to a new group? emanresu Linux - Newbie 5 11-21-2005 08:18 AM
add user to the group ashley75 Linux - General 4 03-30-2005 02:42 PM
how do i add user to a group jogurt666 Linux - General 2 04-02-2004 10:05 PM
how to add a user to a certain group? feetyouwell Linux - Software 2 01-13-2004 11:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration