Sponsored Content
Operating Systems Linux Red Hat Automatically updating sudoers User_Alias userlist? Post 302952334 by Juha on Monday 17th of August 2015 09:32:14 PM
Old 08-17-2015
Automatically updating sudoers User_Alias userlist?

Hi,

I'm just wondering if it is possible to have the User_Alias user list updated when creating a new user?

So, I have the following configuration in /etc/sudoers.d/ADMINUSERS file

Code:
User_Alias ADMINS = user1,user2,user3
ADMINS ALL=(ALL)       ALL
Defaults:ADMINS timestamp_timeout=10
Defaults logfile=/var/log/sudolog

and I had added the few test users manually to the user list. However, I would not like to have the manual step to update the file every time a new user is added and was just wondering if it can be automated somehow when using useradd?

Thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sudoers on HP 11.11

Having a "running low on coffee" moment here & need help. On HP 11.11 where is the sudoers file located; I looked every place I could think of and don't see it. Thanks in advance:confused: (2 Replies)
Discussion started by: dhlopomo
2 Replies

2. Solaris

sudoers and sudo

Hi, on solaris 10, I have two users : user1 and user2 I want to create User_Alias and Cmnd_Alias to allow them to execute a command without prompting for sudo password. command I want these users should be able to run is '/usr/bin/su - abcd' . Also user1 and 2 need not type the 'abcd'... (6 Replies)
Discussion started by: upengan78
6 Replies

3. Shell Programming and Scripting

awk updating one file with another, comparing, updating

Hello, I read and search through this wonderful forum and tried different approaches but it seems I lack some knowledge and neurones ^^ Here is what I'm trying to achieve : file1: test filea 3495; test fileb 4578; test filec 7689; test filey 9978; test filez 12300; file2: test filea... (11 Replies)
Discussion started by: mecano
11 Replies

4. UNIX for Dummies Questions & Answers

sudoers

i just installed/configured apache2.0 on my own aix5.3 mini server. i can start/stop apache by root, but i want to start it under my login id(admin) instead. i need to execute this command: /usr/bin/sudo /usr/IBM/HTTPServer/bin/apachectl stop/start. (5 Replies)
Discussion started by: tjmannonline
5 Replies

5. Solaris

sudoers

this is for the first time i am going to use sudoers i want know how to create sudoers and giving privileges for that users thanks in advance dinu (6 Replies)
Discussion started by: dinu
6 Replies

6. Solaris

sudoers

what is the configuration file for sudo? can we edit it as like other file or will it create any adverse effect on editing that file? thanks in advance dinu (1 Reply)
Discussion started by: dinu
1 Replies

7. HP-UX

sudo/sudoers

Dear folks. Considering PCIDSS standards, i have requirment to use sudo(ers) to log everything a certain user executes with root privileges. Now, for an admin it's just a pain in the ass to prefix every command with sudo. Only way i can think of is making .aliases and with some awk magic... (6 Replies)
Discussion started by: Peasant
6 Replies

8. Shell Programming and Scripting

[SHELL] Userlist alphabetical order

Hi everyone! I am new to the forum and have recently started working with Linux. Quick question, I want a user list in alphabetical order as the output of a shell script. Who can help me!? Thanks! From the netherlands ;) (5 Replies)
Discussion started by: dennisbest85
5 Replies

9. UNIX for Dummies Questions & Answers

Help with Sudoers file

Hi using Solaris 10. trying to update /etc/sudoers file I need to add all the fist level operation team. This is what I have but it doesn't seem to work. Please help.Error message sudo su - >>> sudoers file: parse error, line 9 <<< >>> sudoers file: parse error, line 9 <<< ... (2 Replies)
Discussion started by: samnyc
2 Replies

10. Solaris

Sudoers

Having a bit of a discussion with a software vendor about this. Can anyone confirm my understanding? /etc/sudoers file example:- user1 server1 = NOPASSWD:/usr/bin/ls -l user1 server1 = NOPASSWD:/usr/bin/file But then the following command fails (logged in on server 1 as user1) because... (2 Replies)
Discussion started by: psychocandy
2 Replies
NEWUSERS(8)						      System Manager's Manual						       NEWUSERS(8)

NAME
newusers - update and create new users in batch SYNOPSIS
newusers [new_users] DESCRIPTION
newusers reads a file of user name and cleartext password pairs and uses this information to update a group of existing users or to create new users. Each line is in the same format as the standard password file (see passwd(5)) with the following exceptions. pw_passwd This field will be encrypted and used as the new value of the encrypted password. pw_age This field will be ignored for shadow passwords if the user already exists. pw_gid This field may be the name of an existing group, in which case the named user will be added as a member. If a non-existent numerical group is given, a new group will be created having this number. pw_dir This field will be checked for existence as a directory and a new directory with the same name will be created if it does not already exist. The ownership of the directory will be set to be that of the user being created or updated. This command is intended to be used in a large system environment where many accounts are updated at a single time. CAVEATS
The input file must be protected since it contains unencrypted passwords. SEE ALSO
passwd(1), useradd(8) AUTHOR
Julianne Frances Haugh (jockgrrl@ix.netcom.com) NEWUSERS(8)
All times are GMT -4. The time now is 08:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy