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(1mh)															      whatnow(1mh)

Name
       whatnow - prompting front-end for send

Syntax
       whatnow [ options ] [ file ]

Description
       After  you  have  finished  editing a draft message in or the 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 [options] +folder
       send  [options]
       whom  [options]
       For more information on the options available with these commands, see the following reference pages:

       Use display if you have been using or 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, operates in the background and frees your terminal while the message is being sent.

       Use quit to exit from and to save the draft message.  The -delete option to quit will exit from and delete the draft message.

       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 is invoked.

       For the edit response, you can specify an editor if you wish to override the editor specified in your (R)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 MH invokes with the -push option.

       For the refile response, any valid option to the is valid.  The is the element of your mail profile  which  defines  the  program  used	to
       refile messages in another folder.  For more information, see

       For  the display and list responses, any valid argument to the is valid.  If any non-option arguments are present, then the pathname of the
       draft is excluded from the argument list given to the (this is useful for listing another MH message).  The is the  element  in	your  mail
       profile which defines the program used to display draft messages on your screen.  For more information, see

       See  for further information about how editors are used by MH.  It also describes and and shows how complex variables can be used to direct
       the actions performed by

       Although is usually invoked by other commands, you can use it as a separate command.  You can run on a named file by specifying the file as
       the  file argument.  If you do not give an absolute pathname (one beginning with a / or ./ or ../ ), assumes that the named file is in your
       current working directory.  If you want to run on an existing message, use the -draftfolder and -draftmessage options.

Options
       -draftfolder +folder
       -nodraftfolder
		 Specifies the folder in which 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 The -draft-
		 folder option can be set up in your user profile; see for more information.

       -draftmessage msg
		 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  direc-
		 tory.	(This is different from the file argument to which assumes that the file you name is in your current working directory.)

       -editor editorname
		 Specifies  the  name  of  the	editor you want to use to edit the draft message.  Any legal ULTRIX editor can be specified.  This
		 option is used only if you select the edit response to the What now? prompt.

       -help	 Prints a list of the valid options for this command.

       -noedit	 Prevents the initial invocation of an editor when an MH command is run.  Normally, when you enter an MH command such  as  or  the
		 program  is  called to start the initial edit of the draft message.  If you add this option to the whatnow entry in your the ini-
		 tial edit of the draft message 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

       -prompt string
		 Specifies the prompt used by The prompt you receive when you invoke 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?

Restrictions
       If the sendproc entry in your is uses a built-in program rather than running the regular If you	define	your  own  sendproc  program,  you
       should not not call it as will not run it.

Examples
       In the following example, takes the current message in the folder and asks what you want to do with it:
       % whatnow -draftfolder +drafts
       What now?

       In the following example, takes message 6 from the folder
       % whatnow -draftfolder +drafts -draftmessage 6
       What now?

       The following example sets the prompt to be Now What?:
       % whatnow -prompt "Now What?"
       Now what?

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

Files
       The user profile.

See Also
       comp(1mh), send(1mh), whom(1mh)

																      whatnow(1mh)