Editing Sudoers, what are the options?


 
Thread Tools Search this Thread
Special Forums Cybersecurity Editing Sudoers, what are the options?
# 1  
Old 08-17-2012
Data 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
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

Sudoers

Having a bit of a discussion with a software vendor about this. Can anyone confirm my understanding? /etc/sudoers file example:- user1 server1 = NOPASSWD:/usr/bin/ls -l user1 server1 = NOPASSWD:/usr/bin/file But then the following command fails (logged in on server 1 as user1) because... (2 Replies)
Discussion started by: psychocandy
2 Replies

2. Shell Programming and Scripting

Convert vi editing to text editing

Dear Guru's I'm using Putty and want to edit a file. I know we generally use vi editor to do it. As I'm not good in using vi editor, I want to convert the vi into something like text pad. Is there any option in Putty to do the same ? Thanks for your response. Srini (6 Replies)
Discussion started by: thummi9090
6 Replies

3. Ubuntu

Kernel boot options removed by fault, no boot options

Hello Everyone, First of all, I highly appreciate all Linux forum members and whole Linux community. http://forums.linuxmint.com/images/smilies/icon_wink.gif. I wish you the best for all of you ! I will try to be short and concise: I am using Linux Mint 10 for 2 months on 2 ws, and all went... (3 Replies)
Discussion started by: cdt
3 Replies

4. Solaris

sudoers

what is the configuration file for sudo? can we edit it as like other file or will it create any adverse effect on editing that file? thanks in advance dinu (1 Reply)
Discussion started by: dinu
1 Replies

5. Solaris

sudoers

this is for the first time i am going to use sudoers i want know how to create sudoers and giving privileges for that users thanks in advance dinu (6 Replies)
Discussion started by: dinu
6 Replies

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

7. UNIX for Dummies Questions & Answers

sudoers

i just installed/configured apache2.0 on my own aix5.3 mini server. i can start/stop apache by root, but i want to start it under my login id(admin) instead. i need to execute this command: /usr/bin/sudo /usr/IBM/HTTPServer/bin/apachectl stop/start. (5 Replies)
Discussion started by: tjmannonline
5 Replies

8. UNIX for Dummies Questions & Answers

sudoers on HP 11.11

Having a "running low on coffee" moment here & need help. On HP 11.11 where is the sudoers file located; I looked every place I could think of and don't see it. Thanks in advance:confused: (2 Replies)
Discussion started by: dhlopomo
2 Replies
Login or Register to Ask a Question
whatnow(1)						      General Commands Manual							whatnow(1)

NAME
whatnow - prompting front-end for send (only available within the message handling system, mh) SYNOPSIS
whatnow [options] [file] OPTIONS
Specifies the folder in which whatnow searches for the draft message. By default, the current message in the named folder is used. If you wish to specify another message, use the -draftmessage option. For more information on using a draft folder, see comp(1). The -draftfolder option can be set up in your user profile; see mh_profile(4) for more information. Specifies the draft message to be used. If you specify a folder with the -draftfolder option, the -draftmessage option takes the number of a message in that folder. If you do not specify a folder, -draftmessage takes the name of a file. If you do not give an absolute pathname (one beginning with a / or or ), -draftmessage assumes that the file is located in your Mail directory. (This is different from the file argument to whatnow, which assumes that the file you name is in your current working directory.) Specifies the name of the editor you want to use to edit the draft message. Any legal edi- tor can be specified. This option is used only if you select the edit response to the What now? prompt. Prints a list of the valid options for this command. Prevents the initial invocation of an editor when an MH command is run. Normally, when you enter an MH command such as comp, dist, forw, or repl, the whatnow program is called to start the initial edit of the draft message. If you add this option to the whatnow entry in your is disabled. This is a convenient way of disabling this edit for all MH commands, rather than adding the -noedit entry to the entries for the individual commands in Specifies the prompt used by whatnow. The prompt you receive when you invoke whatnow can be specified as a string with this option. If the prompt contains spaces, you must enclose the entire string in double quotes (" "). The default prompt is What now? DESCRIPTION
After you have finished editing a draft message in comp, dist, forw or repl, the whatnow program prompts you for the next required action. Press <Return> at the What now? prompt to see a list of the available responses. These responses are: display [options] edit [editor] [options] list [options] push [options] quit [-delete] refile [option] +folder send [options] whom [options] For more information on the options available with these commands, see the following reference pages: refile(1), send(1), whom(1). Use display if you have been using repl or dist and want to see the original message. Use edit if you want to continue editing the draft. Use list to display the draft message. If you use push, send operates in the background and frees your terminal while the message is being sent. Use quit to exit from whatnow and to save the draft message. The -delete option to quit will exit from whatnow and delete the draft mes- sage. Use refile +folder to refile the draft message in a specified folder. The send response will cause the message to be delivered. Use whom to find out who will receive the mail when it is sent. Unless the -noedit option is given, the editor starts when whatnow is invoked. For the edit response, you can specify an editor if you wish to override the editor specified in your file. If you specify an editor with the edit response, any valid option to the editor is valid. Similarly, for the send and whom responses, any valid option to send and whom commands, respectively, are valid. For the push response, use any valid option to send. MH invokes send with the -push option. For the refile response, any valid option to the fileproc is valid. The fileproc is the element of your mail profile which defines the pro- gram used to refile messages in another folder. For more information, see mh_profile(4). For the display and list responses, any valid argument to the lproc is valid. If any non-option arguments are present, then the pathname of the draft is excluded from the argument list given to the lproc (this is useful for listing another MH message). The lproc is the element in your mail profile which defines the program used to display draft messages on your screen. For more information, see mh_profile(4). See mh_profile(4) for further information about how editors are used by MH. It also describes lproc and fileproc and shows how complex variables can be used to direct the actions performed by whatnow. Although whatnow is usually invoked by other commands, you can use it as a separate command. You can run whatnow on a named file by speci- fying the file as the file argument. If you do not give an absolute pathname (one beginning with a / or or ), whatnow assumes that the named file is in your current working directory. If you want to run whatnow on an existing message, use the -draftfolder and -draftmessage options. RESTRICTIONS
If the sendproc entry in your is send, whatnow uses a built-in program rather than running the regular send. If you define your own send- proc program, you should not call it send, as whatnow will not run it. PROFILE COMPONENTS
Path: To determine your MH directory Draft-Folder: To find the default draft folder Editor: To override the default editor lasteditor-next: To name an editor to be used after exit from lasteditor fileproc: Program to refile the message lproc: Program to list the contents of a message sendproc: Program to send the message whomproc: Program to determine who a message would go to EXAMPLES
In the following example, whatnow takes the current message in the folder +drafts, and asks what you want to do with it: % whatnow -draft- folder +drafts What now? In the following example, whatnow takes message 6 from the folder +drafts: % whatnow -draftfolder +drafts -draftmessage 6 What now? The following example sets the prompt to be Now What?: % whatnow -prompt "Now What?" Now what? FILES
The user profile. SEE ALSO
comp(1), send(1), whom(1) whatnow(1)