LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 11-14-2008, 11:58 PM   #1
JATA01
Member
 
Registered: Nov 2007
Posts: 197

Rep: Reputation: 15
Exclamation How can we assign group password??


Hi Friends,

I need some help regarding group:

Suppose there is a group called admin and some users like a, b, c is in admin group.
I want to login as admin.
How can we assign password to group admin?

Thank you
 
Old 11-15-2008, 12:02 AM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
No, each user has their own password, and you log in as a user that is a member of a group. As you describe it, admin is not a user, but a grpou.

A user can be a member of one or more groups. Groups are used to assign access rights to files and directories, etc.

Last edited by billymayday; 11-15-2008 at 12:04 AM.
 
Old 11-15-2008, 12:11 AM   #3
JATA01
Member
 
Registered: Nov 2007
Posts: 197

Original Poster
Rep: Reputation: 15
So, how can we assign admin group to sudo privileges?

## Allow root to run any commands anywhere
root ALL=(ALL) ALL
a, b ALL=(ALL) ALL


## Allows people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# %admin ALL=(ALL) ALL

Kindly help me the step by step doc. of sudo.

Thanks-
 
Old 11-15-2008, 12:30 AM   #4
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
http://www.google.com/linux?hl=en&q=...to&btnG=Search
 
Old 11-15-2008, 12:31 AM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Use the "visudo" program to edit the sudoers file. The wheel group is already there for the purpose you want, so you could make these users the members of the "wheel" group instead. Using "visudo", simply delete the "# " comment characters from the "# %wheel ALL=(ALL) ALL" line.

Some distro's configure sudo so that you need to enter the root password. Others configure sudo so that you enter your own password. Doing the latter, you can allow users to execute commands as root without giving them the root password. Suppose that you have another group, backupops, that you allow to run a backup script with permissions to read any file on the system. You can explicitly give the command they can run. The sudoers file has an example allowing %users to mount and unmount CDROMs. If you don't want to distribute the root password for the wheel group members, and don't want them to be able to su to root, you will need to plug some holes such as forbidding vim (which has a :! shell escape; rvim doesn't allow this). You might want to google for examples and also look at restricted bash for some situations. By the way, the sudoers file has a manpage.
 
Old 11-15-2008, 12:47 AM   #6
JATA01
Member
 
Registered: Nov 2007
Posts: 197

Original Poster
Rep: Reputation: 15
Thanks for the help!!
Now I have done some work on this and able to do what I need.

Thanks Again!!!
Shankar
 
  


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 to assign to all users the same password hansos Linux - Server 2 07-22-2008 07:58 AM
Can't assign password to user corbis_demon Linux - General 2 02-22-2005 07:46 AM
how can you assign a password to a new user want2learn Linux - Security 2 09-30-2004 07:50 AM
how to assign password for a user in shell script mtest Programming 10 10-29-2003 06:52 AM
Assign group by IP waifurchin Linux - General 1 01-29-2003 04:36 PM


All times are GMT -5. The time now is 01:08 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