Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I made sure to put it on the last line of sudoers because I've already gone through the pain of learning the hard way that if I put an entry in the middle it can get overridden by a later entry.
So then user backups runs my backup script, but it asks for a password when it gets to this line:
Since it's running as root I want to lock down exactly the rsync command the backups user is allowed to use, otherwise I'd be giving carte blanche to overwrite any file in the system using rsync.
if they can't cahnge the script file that contains all of that, then it's no less secure, and vastly easier to troubleshoot the sudo part of the equation.
Distribution: RHEL 5.9 Server and Workstation, RHEL 6.4,Server and Workstation, OracleVM, HP/UX, Solaris
Posts: 9
Rep:
sudoers error
When I enter a similar command I still get asked for the password. When I put the command in a script and put the script name in sudoers I still get asked for the password and it won't let me execute the command in the script. Example:
When I enter ":x" visudo gives me a syntax error. When I created a script "chown_tree" and put this in using visudo, I got no errors but when the user executes: sudo chown_tree it prompts for the password then reports insufficient permission to execute the command. How do I trouble shoot this problem?
What is the sudo in your command line to be run? That might be prompting for for the password within the command line itself. Also does backups need to run sudo as all users, personal preference I would change ALL=(ALL) to ALL=(root) or ALL=(joeuser).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.