Click to See Complete Forum and Search --> : The RIGHT way to manage security via groups?


mastersibn
11-23-2000, 06:26 AM
I'm interested in pulling it off. I have a public directory that I would like to shut to some users on my computer, and still be writeable by others.

Thing is, I figured out how to add groups (with groupadd) but I don't know how to add myself to this new group! (silly question here http://www.linuxnewbie.org/ubb/smile.gif How do I add myself to this group?

I understand some of the most basic group permissions rules, but I've never really had to mess with them before. http://www.linuxnewbie.org/ubb/tongue.gif

------------------
grab my gnupg key (http://jove.prohosting.com/~msibn/sibn-p.asc) if you feel so inclined.


cAPS lOCK? wHAT cAPS lOCK?
I cna ytpe 300 wrods pre mniuet!!!

Craig McPherson
11-23-2000, 07:31 AM
Edit /etc/group

mastersibn
11-23-2000, 02:33 PM
Originally posted by Craig McPherson:
Edit /etc/group

thought of that already. I cracked it open, and I see NO mention of my username or userid. Name=sibn Id=1000. I know I belong to group 'users,' but I'm not on the same line. Hey, I'm not anywhere in there at all. http://www.linuxnewbie.org/ubb/frown.gif


------------------
grab my gnupg key (http://jove.prohosting.com/~msibn/sibn-p.asc) if you feel so inclined.


cAPS lOCK? wHAT cAPS lOCK?
I cna ytpe 300 wrods pre mniuet!!!

Unruly
11-23-2000, 03:22 PM
adduser <yourname> <groupname>

for example, if you wanted to add me to the audio group, then you'd type:

adduser unruly audio

you should get a line of text confirming that you've been added, or whatnot.

The way craig was trying to get across is to edit the /etc/group and find the group you want (again, in this example, it'll be audio) and add your name like this:

<snip>

audio:x:29:unruly

</snip>

(italics show the orignial stuff, bold shows the addition)

That should manually add you to the group. I just find adduser <user> <group> much easier to do, rather than fiddle with /etc/group, but if I need to find groups to be a part of, then I go a looking.

------------------
Nathan
Q: How many existentialists does it take to screw in a lightbulb?
A: Two. One to screw it in and one to observe how the lightbulb itself symbolizes a single incandescent beacon of subjective reality in a netherworld of endless absurdity reaching out toward a maudlin cosmos of nothingness.

mastersibn
11-23-2000, 06:08 PM
Thanx craig, unruly.

Shortly after I got craig's reply, I (on a hunch) looked up group(5) and found out how to manually edit /etc/group. I think in the future, though, I will use adduser if Slack will let me. Slack's adduser is kinda funky to me. http://www.linuxnewbie.org/ubb/tongue.gif

I have another (perhaps silly) question, though. In this directory, I want to easily permit users to add directories at will in this tree. And I want other users to be able to create files/directories IN those directories, but not delete them. I'm thinking the best way to do this would be to chmod 775 the directories, and leave the files as-is. I don't really care who owns the directories (though for some reason, I can't chown them to nobody) and if the owner doesn't have permission to write, then the group write doesn't override it.

I think what I'm saying is that if I chmod it 575 for nobody, then it works for all users. If I chmod it 575 for sibn, then I can't create files, but everybody else in my group could. I think if I chmod it 775 and chown it to myself, then I can create freely (as can anybody else) but nobody can delete the files I create there? http://www.linuxnewbie.org/ubb/confused.gif

not sure if anybody really understands what I want to do here... I'm not really sure about it myself. http://www.linuxnewbie.org/ubb/tongue.gif

As long as I own a file, I'm the only person who can remove it, correct?

------------------
grab my gnupg key (http://jove.prohosting.com/~msibn/sibn-p.asc) if you feel so inclined.


cAPS lOCK? wHAT cAPS lOCK?
I cna ytpe 300 wrods pre mniuet!!!