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
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
07-09-2002, 04:04 PM
#1
Member
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747
Rep:
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
07-09-2002, 04:20 PM
#2
Member
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483
Rep:
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
07-09-2002, 04:48 PM
#3
Member
Registered: Jul 2002
Location: Chicagoland
Distribution: Gentoo, Ubuntu
Posts: 63
Rep:
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
07-09-2002, 05:12 PM
#4
Guru
Registered: Jan 2001
Posts: 24,121
Rep:
I just usually edit the file /etc/group to add users to a particular group...
07-09-2002, 05:18 PM
#5
Member
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483
Rep:
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.
07-09-2002, 05:30 PM
#6
Guru
Registered: Jan 2001
Posts: 24,121
Rep:
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...
07-09-2002, 05:58 PM
#7
Member
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747
Original Poster
Rep:
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..
...
07-09-2002, 06:05 PM
#8
Member
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483
Rep:
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 .
07-09-2002, 06:05 PM
#9
Guru
Registered: Jan 2001
Posts: 24,121
Rep:
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...
07-09-2002, 06:17 PM
#10
Guru
Registered: Jan 2001
Posts: 24,121
Rep:
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.
07-09-2002, 06:24 PM
#11
Member
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483
Rep:
What kind of interesting is there doesn't seem to be a command to remove a user from a group ?
07-09-2002, 07:18 PM
#12
Member
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747
Original Poster
Rep:
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
07-09-2002, 07:47 PM
#13
Member
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483
Rep:
NO this is Unix
07-10-2002, 06:45 AM
#14
Member
Registered: Jul 2002
Location: Chicagoland
Distribution: Gentoo, Ubuntu
Posts: 63
Rep:
I apologize for not seeing the obvious. Please forgive me.
07-10-2002, 11:11 AM
#15
Guru
Registered: Jan 2001
Posts: 24,121
Rep:
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...
Thread Tools
Search this Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -5. The time now is 04:19 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News