Add sudo executable commands

Guy's

I have sudo already installed in AIX , just I want to know how can I add for example the following commands to be executed by sudo by (appuser)..

shutdown
/usr/startapp.sh
/usr/stopapp.sh

Add a line like the following to your sudoers file using visudo:

appuser ALL = (ALL) shutdown, /usr/startapp.sh, /usr/stopapp.sh

The syntax is always:

user host = (other) [option] command

where

  • user is the user that should be allowed to run these commands
  • host is the host where this should be allowed, in case you use the same sudoers file on multiple hosts. ALL means any host
  • other is the user that these commands may be run as. So if you want to allow an user to run a program as www-data, put that name there. ALL means any user.
  • option is a modifier, most common is NOPASSWD to disable asking for passwords. See the sudoers man page for more details
  • command is a comma-separated list of commands, as detailed as you like, of programs this user may run.

See the sudoers man page for more details

Thanks for your replay I configured it by sudo :b:...

Another thing and before I do that , I'm planning to apply this command by sudo errclear 0

is it possible to make an errclear.sh then I'll type inside it errclear 0
is it good way to mentioned this file \root\errclear.sh in sudo to be executable or can I execute this direct command errclear 0....

And can you please give me the software of sudo !

In the sudoers file you can specify commands to and level of detail you want, eg. the entry

  • mount would allow any command named such, no matter where
  • /sbin/mount would only allow that command when specified with the complete path
  • /sbin/mount -t nfs 1.2.3.4:/export /import would only allow this exact command, and no derivation from it

What do you mean by that? According to your first post, you've already got it installed.

Yes.. I want the software best version and if you have any direct link to download it please provide !

The official site (as far as I can see) is here. The Download page lists 3 different sites holding packages for AIX, including one at IBM itself.

Total search time, from loading Google to the Download page at IBM: 30 seconds.
Total time to write this post: 1 minute.