|
-
Editing Sudoers, what are the options?
Hi,
I am confused about editing Sudoers file as what to write and what not to? Can you please help me?
I am trying to edit Sudoers for running few commands like copying, moving, listing, searching, creating, changing permissions on files and directories in the home directory for user e.g. a test user but i am not sure how to restrict the user action to a particular directory or restrict the commands all other commands except ls, cp, grep, wc, cat, touch, chmod, chown running at root level (e.g. rm -r command)? What would be the syntax?
Thank you in advance.
Shahmeer
-
-
Hi,
a normal user only can damaged his own files in his own home directory but if you want to permit him to execute commands like a root (dangerous thing) you should edit sudoers.
Example: permit a user test to rebbot the server:
edit /etc/sudoers with visudo
#visudo
add the line:
test ALL = NOPASSWD: /sbin/reboot
test> sudo reboot
Remenber to use complete path to the comands (#which reboot) in /etc/sudoers.
Regards.
-
-
Shahmeer if you let the user run chmod then they can make everything belong to them. Then they can quite happily rm -r as their own user.
Also chmod -R / 755 is plenty destructive to the system in itself. If you don't trust them don't allow them to execute above user level.
-
Similar Threads
-
By News in forum Linux News
Replies: 0
Last Post: 03-26-2012, 08:33 AM
-
By News in forum Linux News
Replies: 0
Last Post: 01-17-2012, 09:28 AM
-
By Fred in forum Linux News
Replies: 0
Last Post: 12-22-2011, 08:36 AM
-
By Fred in forum Linux News
Replies: 0
Last Post: 12-03-2011, 07:22 PM
-
By Fred in forum Linux News
Replies: 0
Last Post: 11-04-2011, 12:50 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Check out Linux Central for Linux software and other goodies!
» Recent Threads
» Stats
Members: 3,586
Threads: 3,921
Posts: 9,448
Top Poster: Fred (1,486)
» Links
|
Bookmarks