Visit The New, Modern Unix Linux Community

Possible to give non root user sudo to "crontab -l"

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Possible to give non root user sudo to "crontab -l"
# 1  
Possible to give non root user sudo to "crontab -l"

Does anyone know if this is possible?

I want to give some users access to root's crontab but only with a read privilege.

Is this possible to do or can only root or people with full root sudo view root's cron?
# 2  
I would try it with sudo and try to restrict it explicit on "crontab -l". You would have to setup something like:
root> visudo
User_Alias      crontab_reader = mike,ron,susy,dilbert,sauron
Cmnd_Alias      havealook =     /usr/bin/crontab -l

crontab_reader          somehost =      NOPASSWD:havealook

Then try with one of that users with "sudo /usr/bin/crontab -l".
# 3  
I have tried to do it with " and ' but it just gives me a sudo syntax error when I try to save it.

>>> sudoers file: syntax error, line 335 <<<

Or such.
# 4  
It could be that I edited my former post with some more info you have not used in your try yet. Anyway, I am off for now, have a nice weekend and good luck! Smilie

p.s.: For more syntax help on sudoers, check the sudo page on the web.
# 5  
Oh that worked.


Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #175
Difficulty: Medium
ENIAC was one of the first electronic computers and occupied 167 square meters, weighed 27 tons and consumed 150kW of electricity.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to run root level command , if user has "su -" permission in sudoers provided?

I am looking t run root level command on multiple servers, but all servers have only "su - " permission available in sudoers. please help me if any way that I can run command using help of "su -" My script for hosts in `cat hosts.txt`; do echo "###########################Server Name-... (5 Replies)
Discussion started by: yash_message
5 Replies

2. Shell Programming and Scripting

Expect: spawn id exp5 not open while executing "expect "$" { send "sudo su -\r" }"

Hi All, i am trying to ssh to a remote machine and execute certain command to remote machine through script. i am able to ssh but after its getting hung at the promt and after pressing ctrl +d i am gettin the out put as expect: spawn id exp5 not open while executing "expect "$" {... (3 Replies)
Discussion started by: Siddharth shivh
3 Replies

3. Shell Programming and Scripting

Root running a script calling to scp using user "xyz" is not authenticating!

Close duplicate thread. (0 Replies)
Discussion started by: denissi
0 Replies

4. AIX

Change "root" to "root.admin" in outgoing e-mails

Our AIX servers send e-mails which have the "from" address set to "" for our root user ("C{M}" in /etc/ The problem is that when bad e-mails are sent out or rejected by remote servers, they are being returned and delivered to e-mail box of "Mary Root". ... (2 Replies)
Discussion started by: kah00na
2 Replies

5. UNIX for Dummies Questions & Answers

Do I need to be "Sudo" user for file movement fr

Hi Experts Do I need to have "Sudo" privileges or user for file movement for file movement from one remote server to another or from local to remote server?:wall: (6 Replies)
Discussion started by: parpaa
6 Replies

6. HP-UX

How to set up "sudo su -" to root with no need to type password?

Tittle has it.... Thanks friends... (2 Replies)
Discussion started by: 300zxmuro
2 Replies

7. UNIX for Dummies Questions & Answers

changing password with sudo user " permission denied"

HI All, I am using solaris i created a user adam and updated his permissions in vi sudoers file as follows adam ALL=(ALL) NOPASSWORD: ALL ........... when i create user by logging as sudo user . $ sudo useradd -d /home/kalyan -m -s /bin/sh kalyan sudo: not found ... (6 Replies)
Discussion started by: kalyankalyan
6 Replies

8. UNIX for Dummies Questions & Answers

crontab does not run "root" job

hi, I've read different posts regarding crontab but none helped out...the shell scrip that I want to run through crontab gets run through crontab when I use the following crontab statement: 13 17 * * * /usr/net/gcc/ > /usr/net/gcc/DBdrop.log 2>&1 but it does not run when I scheduel... (2 Replies)
Discussion started by: linux0004
2 Replies

9. Red Hat

error"warning: user owen does not exist - using root"?

I am trying to install openmotif22-2.2.3-18.src.rpm, after I typed in " rpm -i openmotif22-2.2.3-18.src.rpm" the following message comes out: warning: user owen does not exist - using root warning: group owen does not exist - using root I am install openmotif under root account. Do... (2 Replies)
Discussion started by: fishwater00
2 Replies

10. Solaris

sendmail "root... User address required." error

I'm running sendmail (8.13.8+Sun/8.13.8/Submit) solaris 10. When I send mail to root at the command line (whether I use a full-qualified address or just root), I get the error message root... User address required. Sending mail to root (either at the command line or in a cron job),... (10 Replies)
Discussion started by: csgonan
10 Replies

Featured Tech Videos