Using a seperate file with sudoers file


 
Thread Tools Search this Thread
Operating Systems AIX Using a seperate file with sudoers file
# 1  
Old 09-14-2017
Using a seperate file with sudoers file

it is hard to explain what i am wanting to find out.

Basically in the sudoers file under user_alias commusers, would i be able to use a seperate file (.txt file for example) and state that in the sudoers file to use rather than inserting the new users that i need adding to commusers part of the suoders?

regards
# 2  
Old 09-14-2017
man sudoers:
Quote:
Including other files from within sudoers
It is possible to include other sudoers files from within the sudoers file currently being parsed using the #include and #includedir directives.
# 3  
Old 09-14-2017
Quote:
Originally Posted by RudiC
man sudoers:
Thank you I will talk with our aix devs when possible. Apparently they are busy Smilie
# 4  
Old 09-15-2017
Quote:
Originally Posted by liamf91
Basically in the sudoers file under user_alias commusers, would i be able to use a seperate file (.txt file for example) and state that in the sudoers file to use rather than inserting the new users that i need adding to commusers part of the suoders?
Not directly. You can - as RudiC has already said - include other files containing sudo-rules, but you can't use these files to modify the composition of certain rules.

What you can do, though, is to use a preprocessor of some sorts (gcc should do) to create a sudoers-rulefile which you then can include into the rules.

I hope this helps.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract columns into seperate file

I have a comma delimited file as per the one below and I am currently extracting the values in 2 columns (COL1 & COL6) to produce a smaller trimmed down version of the file which only contains the columns we need; COL1,COL2,COL3,COL4,COL5,COL6,COL7,COL8,COL9... (1 Reply)
Discussion started by: Ads89
1 Replies

2. Solaris

Sudoers file

In the sudoers file in Solaris... I am trying to limit the DEVELOPER user privileges to where those users can only use the “rm” command in certain directories. This is to prevent them from deleting directories or files and destroying a server. I want them to be able to use the "rm" command but... (1 Reply)
Discussion started by: nzonefx
1 Replies

3. 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

4. UNIX for Advanced & Expert Users

sudoers file

i have defined a rule in the sudoers file so a specific user is able to run some commands as sudo with no password. my question is: is it possible to restrict a user to run commands as sudo only in a certain directory? for example: chown only the files that are located in /var/tmp. Thank you. ... (2 Replies)
Discussion started by: noam128
2 Replies

5. Shell Programming and Scripting

Seperate file content

hi all, i have some file whoes contents are 0 /home8/mc09ats/UnixCw/a1 1 /home8/mc09ats/UnixCw/a2 2 /home8/mc09ats/b3 3 /home8/mc09ats/UnixCw/d1 i want to seperate the content following way... fileindex= 0 filepath=... (4 Replies)
Discussion started by: AbhijitIT
4 Replies

6. UNIX for Dummies Questions & Answers

Script for parsing details in a log file to a seperate file

Hi Experts, Im a new bee for scripting, I would ned to do the following via linux shell scripting, I have an application which throws a log file, on each action of a particular work with the application, as sson as the action is done, the log file would vanish or stops updating there, the... (2 Replies)
Discussion started by: pingnagan
2 Replies

7. UNIX for Dummies Questions & Answers

Seperate contents in a file with | as delimiter

Hi, I do have a file with follwoing as contents: 816|817118| 816|933370| 816|1215241| I want to store the above values into two arrays as follows: arr1 = { 816,816,816} arr2 = {817118,933370,1215241} How it can be achieved ? (5 Replies)
Discussion started by: risshanth
5 Replies

8. Shell Programming and Scripting

seperate elements of a file

i want to write a script in Bash Shell that accept a list of files.an example of file is 4334:234 322.345:32 234:3452 e.t.c each file only contain lines like num1:num2 i want to count the lines of this file and find the summary of X=4334+322.345+234 and Y=234+32+3452 (1 Reply)
Discussion started by: nektarios4u
1 Replies

9. Shell Programming and Scripting

Split File into seperate files

Hi, So I have a text file which I want to separate into separate text files. I would use the split command but the problem here is that the text file is separated by delimiters. For example: blah blah blah ------ more text ----- and some more text So basically the first part should be... (4 Replies)
Discussion started by: eltinator
4 Replies

10. Linux

sudoers file

Hi, I have edited 'sudoers' file to allow 'cads' user shutdown the system without providing a password. Can someone tell me what's wrong with my file? It's not working when I 'sudo SHUTDOWN' command: sudo: SHUTDOWN: command not found Thanks a lot! # Host alias specification... (4 Replies)
Discussion started by: whatisthis
4 Replies
Login or Register to Ask a Question