Tag Info

Hot answers tagged

7

time sudo command executes your shell's time builtin if it has one, whereas sudo time command always executes the time executable in the program search path ($PATH). time sudo command includes the time taken by the sudo command, whereas sudo time command doesn't. You should use sudo time command, because sudo's processing time is small but not always ...


1

If you only wanted to allow a user to edit /etc/fstab, you could do this in several ways: Make sure access control lists are enabled (acl option in the /etc/fstab entry for /), and setfacl -m user:joe:rw /etc/fstab. Add a sudoers rule: run visudo and add a line joe ALL = sudoedit /etc/fstab I recommend the sudo method because it makes it easy to audit ...


1

If you try to enumerate every single utility that an administrator may need to use you'll be sitting at the keyboard for a while. Technically, this sort of desire is why Linux capabilities were developed. To do what you're wanting: you could give the users particular capabilities and then just give user1 write access to fstab (via ACL or something) and ...


1

It would be best to design your automation such that it's fired off from crontab on the server itself. Another possibility is to create a setUID wrapper (which can just be something like a C program that calls execv("/path/to/script",argc,argv); or the like) for the root-required commands, and only allow your automation users to run it via group ...



Only top voted, non community-wiki answers of a minimum length are eligible