1752815 Members
5790 Online
108789 Solutions
New Discussion юеВ

Re: sudo

 
Patrick Wallek
Honored Contributor

Re: sudo

How are you running the commands? What errors are you getting? If you could post the command you are trying and the output it would be a great help.
Mehmood Ansari
Frequent Advisor

Re: sudo

Hi

There is user OPER and within the menu I need to take fbackup/reboot the system. I defined sudo as per Support forumm members. I am getting fbackup not found, if I run fbackup from root it is working. I want sudo to work perfectly.

Regards
Patrick Wallek
Honored Contributor

Re: sudo

You may need to modify your menu so that it does a 'sudo /usr/sbin/fbackup'. fbackup is not normally in a non-root users path. Using full path names is always a good idea in scripts / menus.

You could also just add /usr/sbin to the oper users PATH either in /etc/PATH, /etc/profile or opers .profile file.
Jannik
Honored Contributor

Re: sudo

Hey Mehmood,
Does any command work with sudo?
I would think you need to set the stikky bit on /usr/local/bin/sudo file!
It needs to look like this:
# ls -al /usr/local/bin/sudo
---s--x--x 1 root sys 114688 Oct 15 2003 /usr/local/bin/sudo

some depot versions of sudo for HPUX does not set it :-).
chmod 4111 /usr/local/bin/sudo

Best regards!
jaton
Mehmood Ansari
Frequent Advisor

Re: sudo

Hi
Jannik
Thanks for your help I set the file permission as chmod 4111 /usr/local/bin/sudo its work.

Thanks again.

Mehmood