LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 07-31-2007, 10:45 PM   #1
Linux_Enabled
LQ Newbie
 
Registered: Jul 2007
Location: Richmond, VA
Posts: 2

Rep: Reputation: 0
Trying to Add Users to Newly Created Group (Red Hat version)


I have just created a new group and would like to add existing users to the new group. I've already changed the ownership of the files to myself in the newly created group. I want to do this because the information in the files is very sensitive and I want to limit access to the files to members of the new group only. It seems to me, intuitively, that one may either be able to change ownership of the files to a group but not a particular user, or add users to the restricted group and they will automatically have access to the files. I will greatly appreciate any assistance any one can provide.
 
Old 07-31-2007, 11:13 PM   #2
loonix
Member
 
Registered: Aug 2003
Location: Sydney Australia
Distribution: CentOS/archlinux
Posts: 40

Rep: Reputation: 16
Hi there is several ways to do this but this is one way:
Check what groups the user is already in.
as root:
root#: groups username
tty wheel audio users

This will tell you the groups that username belongs to.
In this case tty wheel audio and users.
To add this user to the group "secret"
do the following as root:
root#: usermod -G tty,wheel,audio,users,secret username

This would add username to the secret group and leave them in the groups they were already in.
Then remember to set the permissions properly for the file(s) you want to give group access to.

root#: chgrp secret filename
root#: chmod 660 filename


Hope this helps.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I add users???? Red Hat 8 Help!! spilotro47 Linux - Software 7 03-28-2006 04:20 PM
Which Red hat version best for using GSX / Best Red Hat distro? Rustylinux Linux - Software 2 03-27-2006 12:27 PM
howto add users to group? Lleb_KCir Linux - General 2 06-04-2005 01:28 AM
add all users as audio group Kocil Linux - Security 1 07-27-2004 03:28 AM
add users to new group, non-GUI jules_fraser Linux - Newbie 3 01-22-2004 07:37 AM


All times are GMT -5. The time now is 11:51 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration