LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How can we assign group password?? (https://www.linuxquestions.org/questions/linux-server-73/how-can-we-assign-group-password-683509/)

JATA01 11-14-2008 11:58 PM

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

billymayday 11-15-2008 12:02 AM

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.

JATA01 11-15-2008 12:11 AM

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-

billymayday 11-15-2008 12:30 AM

http://www.google.com/linux?hl=en&q=...to&btnG=Search

jschiwal 11-15-2008 12:31 AM

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.

JATA01 11-15-2008 12:47 AM

Thanks for the help!!
Now I have done some work on this and able to do what I need.

Thanks Again!!!
Shankar


All times are GMT -5. The time now is 02:59 PM.