Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help with user groups
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
kramerkeller
Apprentice
Apprentice


Joined: 20 Jun 2005
Posts: 179

PostPosted: Sun Jul 10, 2005 10:28 pm    Post subject: Help with user groups Reply with quote

Alright so I need a little help with how user groups work.

I went to my groups file and I see tons of stuff with users on 100 and ssh on 22 and ftp on 21.

I also made a not-root login for myself and my friend.

However, I am not sure how to give us access to write files, run executables and the like and even how to make it possible for us to make user accounts for others (maybe that can only be done on root).

The other thing I was wondering is under groups I noticed portage had a name. SO is portage basically
allowed to log in to my machine (i know what portage is, but could someone else name themselve portage and log in or what - I have NO CLUE Obviously)

I guess I am just wondering if everytime I create a login - do I have to add the person to all the things they need. LIke VIDEO and some that are just needed. Pleasee just explain and help. You guys are the best.
Back to top
View user's profile Send private message
HAL_9000
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2004
Posts: 114
Location: Netherlands

PostPosted: Mon Jul 11, 2005 10:15 am    Post subject: Reply with quote

you do NOT want to allow users to make other users in files like /etc/passwd and /etc/shadow...

if you wish to create users from within a user account, make sure it's not much more than ftp/email access...
no shell anyway... and you're probably going to use pam or somethink...
_________________
We are the keepers of the sacred words: Ni peng and Nee wom!
Back to top
View user's profile Send private message
kramerkeller
Apprentice
Apprentice


Joined: 20 Jun 2005
Posts: 179

PostPosted: Mon Jul 11, 2005 7:34 pm    Post subject: Reply with quote

Okay, right now. I set up a user named kramer. I can log in, but then I can't do anything. I can't even su to root after logging in. Now, am using putty to log in via SSH and I would like to not log in as root from a remote location becasue I guess that is pretty bad. However, I would like to log in from a remote location adn be able to do something other than look at files. I owuld like to even su to root, so that I can do things here and there that require root priveleges. I have one of those jobs with extra time and if I could do all my linux fun from there it would be great Please help me to make a user with rights or permissions and a way to safely do anything from a remote location that I could do from home, like emerging a program or running program. After this I can worry about a group of users with specific privileges.
Back to top
View user's profile Send private message
ausmusj1
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2004
Posts: 121

PostPosted: Mon Jul 11, 2005 7:45 pm    Post subject: Reply with quote

kramerkeller wrote:
Okay, right now. I set up a user named kramer. I can log in, but then I can't do anything. I can't even su to root after logging in. Now, am using putty to log in via SSH and I would like to not log in as root from a remote location becasue I guess that is pretty bad. However, I would like to log in from a remote location adn be able to do something other than look at files. I owuld like to even su to root, so that I can do things here and there that require root priveleges. I have one of those jobs with extra time and if I could do all my linux fun from there it would be great Please help me to make a user with rights or permissions and a way to safely do anything from a remote location that I could do from home, like emerging a program or running program. After this I can worry about a group of users with specific privileges.


In order to use the su command, a user has to be part of the "wheel" group. To add your existing "kramer" user to the wheel group, login as root, then do the following:
Code:
gpasswd -a kramer wheel

After this, when you login as kramer, you will be able to su - to root. You can also look into using sudo, which allows root power for a single command, instead of switching entirely to a root user. In order to be able to sudo, you will need to
Code:
emerge app-admin/sudo

and then edit the "sudoers" file in /etc. If you use vim, you will be able to do this by running
Code:
visudo



HTH-

James
Back to top
View user's profile Send private message
kramerkeller
Apprentice
Apprentice


Joined: 20 Jun 2005
Posts: 179

PostPosted: Mon Jul 11, 2005 9:55 pm    Post subject: Reply with quote

WOW! That worked great. Now I figured out a lot of permissions stuff, like chmod 777 and 751 and 666 I have a list of what 1-7 means and all that. However, I really would like to just set up a user group. I would like an admin group where everyone in that group just has those permissions that I have set up for those in the group.
Back to top
View user's profile Send private message
ausmusj1
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2004
Posts: 121

PostPosted: Mon Jul 11, 2005 10:47 pm    Post subject: Reply with quote

Well, there should be a "users" group already set up in your installation. However, if you are wanting to create a new group that you will use for stanrard users, you can create new groups with the following:
Code:
groupadd myusersgroup

And then when you create new users, you can specify their primary group to be the "myusersgroup" group with the following:
Code:
useradd -g myusersgroup <the rest of your useradd options> newusername

Or, you can just set the "myusersgroup" as one of their secondary group memberships with the following:
Code:
useradd -g users -G myusersgroup <the rest of your useradd options> newusername


You can do the same with a custom administrator group, as well.

-James
Back to top
View user's profile Send private message
kramerkeller
Apprentice
Apprentice


Joined: 20 Jun 2005
Posts: 179

PostPosted: Mon Jul 11, 2005 11:36 pm    Post subject: Reply with quote

Thanks - it seems the more I ask the more I need to ask. SO my original impression of user groups was that I could set rights to the group- as far as what the group could do, like chmod 777 - that sort of stuff.

So lets say i added a group called admin - which I did

I later just went into the group file and added kramer, kyle, and nate to the admin grup which is like 401 or something. So now I want us to be able to pretty much access everything, and if I ever add an admin in the future I could just add him to the group adn the group would have all the permissions. The I would like to make a users group I guess. In this group I would like people to maybe have access to there own folder and some user files and programs that are available. How would I go about doing that. How do I set group permissions? Then I guess I would make a special folder or use the user folder and put programs and stuff in there everyone could use. Please help me out with this. I just want to let my friends have a spot to store a file and get files, but not go everywhere. Except my close computers friends of course I trust them and will let them learn gentoo with me as admins. Any help would be great and thanks I did set up a group - I am just tyring to figure out what to do with the group.
Back to top
View user's profile Send private message
kramerkeller
Apprentice
Apprentice


Joined: 20 Jun 2005
Posts: 179

PostPosted: Tue Jul 12, 2005 10:56 pm    Post subject: Reply with quote

Wow - sudo is great

So in sud0 - can I give my friends some root privaleges, but restrict a few things

I would like to be able to have my close freinds emerge some programs - so I want them to have some privaleges - i guess I could just tell them to ask me first - or maybe a log so I see when they emerge stuff. Or help with groups!! I set up a an admin group, but I have no idea how to manipulate the privaleges they have. I guess I have to add friends to the portage group maybe, or can I make a group that has access to portage. I am still confused - HELP?
Back to top
View user's profile Send private message
kramerkeller
Apprentice
Apprentice


Joined: 20 Jun 2005
Posts: 179

PostPosted: Wed Jul 13, 2005 3:25 am    Post subject: Reply with quote

Group permissions - anyone - anyone - basic guide to linux commands - reference guide would be prefect - anyone - anyone

Thanks for the help in advance
Back to top
View user's profile Send private message
HAL_9000
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2004
Posts: 114
Location: Netherlands

PostPosted: Fri Jul 15, 2005 12:06 pm    Post subject: Reply with quote

kramerkeller wrote:
Group permissions - anyone - anyone - basic guide to linux commands - reference guide would be prefect - anyone - anyone

Thanks for the help in advance


the drwxrwxrwx file permissions stand for
d - directory or not
rwx
- the first three are for the user owning the file/directory
- the second three are for the group related to the file/directory
- the third three are for 'the rest' (aka world)

the manual gives more information, but here's a simple concept to help you
r is worth 4, w is worth 2, x is worth 1

add those and decide what to do :)
e.g. chmod 755 <filemask> will give everybody read/execute rights, but only the user the permissions to write

There's more to it, but first start with this :P
_________________
We are the keepers of the sacred words: Ni peng and Nee wom!
Back to top
View user's profile Send private message
kramerkeller
Apprentice
Apprentice


Joined: 20 Jun 2005
Posts: 179

PostPosted: Thu Jul 21, 2005 1:43 am    Post subject: Reply with quote

So if I create a group called admin. Which I have and I add users to that group - like kraemr, kyle, nate - which I have.
Now I would like kramer, kyle, and nate to basically be able to do anything - alsmot like root. Can I set it up so that anyone in the admin group can basically do anything, but people in usr group can only read and write or something like that. (I am not sure yet). OR do I have to set permissions for each user added like chmod kyle 777 or something like that. I would prefer just to add people to different groups taht have different permissions.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum