Sponsored Content
Top Forums Shell Programming and Scripting Addsudoers: A script to add users or groups into /etc/sudoers Post 302531945 by Corona688 on Saturday 18th of June 2011 07:51:34 PM
Old 06-18-2011
Why edit groups into sudoers instead of adding users to groups? Let the login system do the legwork.
 

10 More Discussions You Might Find Interesting

1. Cybersecurity

Users and groups

Hi, Is it possible that one user belongs to many groups, or the relation of user/group is 1/1?. Thanks Ramón (2 Replies)
Discussion started by: rsanz
2 Replies

2. Linux

listing users and groups

RH 7.2 I'm trying to list the users & groups on my machine. I found the lsuser & lsgroup commands but no associated man pages. I typed: lsuser I get --> Valid options are: -a So I typed: lsuser -a I get --> Valid options are: groups, home So I typed: lsuser -a groups I get -->... (2 Replies)
Discussion started by: jalburger
2 Replies

3. UNIX for Dummies Questions & Answers

users and groups

hi eveyone i've recently requested my unix admin to create a userid for 2 groups. He created the id and i can see it by grep "id" /etc/group. But when i login with that id into unix and try to cd that group it says permission denied. something like cd /groupname -- permission denied Can my admin... (1 Reply)
Discussion started by: sammet
1 Replies

4. Shell Programming and Scripting

Removing users from sudoers - help needed

I'm trying to create a script to remove users from sudoers on multiple servers. I'm able to do this with a one-line script using sed, but only if it's on one server. Example: sed '/someuser/d' /host/local/etc/sudoers Also, I think the problem with this one-line script is that I would have to... (4 Replies)
Discussion started by: em23
4 Replies

5. Solaris

sudoers file with groups in LDAP

Hello gurus, I've been working on a sudoers file to work with groups in LDAP. I've created the groups in LDAP and added the users to there respective groups. I've also setup my sudoers file to have the groups match what is in LDAP. And I've added ldap to nsswitch.conf in the group line. The... (6 Replies)
Discussion started by: em23
6 Replies

6. Shell Programming and Scripting

shell script to find unowned users and groups

Hello, I am new to Unix and shell scripting. I am trying to find unowned files and groups on my servers. I know, i could use the below command to find it on individual server. #find / -nouser -o -nogroup -print But I was wondering, if someone could help with a shell script so that I can... (2 Replies)
Discussion started by: ut916
2 Replies

7. Shell Programming and Scripting

Shell script for to view all users & groups history in root

Dear All, I want to know all users & group history in one file, for root terminal through shell or any other option (5 Replies)
Discussion started by: kpoobathi
5 Replies

8. Shell Programming and Scripting

Script to read through a file and create new users/assign them to groups in Ubuntu

Hi all. I need a shell script that can, in short, read through a text file line by line and create a new user in Ubuntu, as well as assign that user to a group. The format of the text file is not important but preferably: 'username:group'. I don't have much programming knowledge no matter shell... (3 Replies)
Discussion started by: LewisWeekly
3 Replies

9. Red Hat

How to disable sudo -i in sudoers file for users?

All, I need to disable "sudo -i" and "su - " for all servers in our environment, We want to make sure no one run commands or delete files across environment using switching to root account. can you guys please lets me know if this is achievable. Thanks and Regards shekar (2 Replies)
Discussion started by: shekar777
2 Replies

10. UNIX for Beginners Questions & Answers

How to write a UNIX script to send a mail to the respective individual users about their groups?

Hi Team, I got a requirement to send a mail to the individual users of a unix server about their respective groups. can some one help me to provide the script as I am unable to write that. I tried with below lines but I come out with errors. cat /etc/passwd | awk -F':' '{ print $1}' |... (6 Replies)
Discussion started by: harshabag
6 Replies
group(4)						     Kernel Interfaces Manual							  group(4)

NAME
group - Group file DESCRIPTION
The /etc/group database contains the following information for each group: Group name Encrypted password Numerical group ID A comma-sepa- rated list of all users allowed in the group Note: Do not put any spaces between a comma and a username; otherwise, the username following the comma will not be made a part of the desired group. The /etc/group file is an ASCII file, with the fields separated by colons. Each group is separated from the next by a new line. If the password field is null, no password is demanded. Because of the encrypted passwords, it can and does have general read permission and can be used, for example, to map numerical group IDs to names. Note that commands or scripts used for adding users to groups are subject to the 225 character limit on line lengths. However, you can split lines as appropriate. RESTRICTIONS
Increasing the number of groups that a user is in beyond 16 can affect services that use ONC RPC. Tru64 UNIX ONC RPC supports up to 32 groups for compatibility with ULTRIX Version 4.2 and higher. Other vendors may support only 16 groups. ULTRIX versions before 4.2 support up to 8 groups. Users who increase their group membership beyond 8 or 16 groups will not be able to NFS mount file systems from servers that only support 8 or 16 groups over NFS. In addition, if root group membership is increased beyond 8 or 16, the NIS service will not work in a mixed NIS server environment where the servers support only 8 or 16 groups. The addgroup command limits the length of a group name to eight characters or less. FILES
/etc/group RELATED INFORMATION
Commands: addgroup(8), groupadd(8), adduser(8), groups(1), passwd(1) Functions: setgroups(2) Routines: initgroups(3) Files: passwd(4) delim off group(4)
All times are GMT -4. The time now is 04:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy