1820160 Members
2828 Online
109620 Solutions
New Discussion юеВ

Sudo with Samba

 
Pradeep_19
New Member

Sudo with Samba

I have samba installed on a HP-UX11i server.
I am using sudo too.
When I am trying to start or stop samba using sudo I get "Sorry, user xxx is not allowed to execute ../../../stopsmb as root".
Am I missing any configuration ?

thanks
-pradeep
4 REPLIES 4
Sanjay_6
Honored Contributor

Re: Sudo with Samba

Hi,

Are you using -u option with the sudo command.

logged in as some user.

want to execure /some_file as root. If your sudoers is configured correctly,

try,

sudo -u root /some_file

Hope this helps.

Regds
P.S. : I hope its "u". I'll have to check. Check sudo man pages if that doesn't help.
RAC_1
Honored Contributor

Re: Sudo with Samba

Have you correctly configured sudoers file? and have you given right to thi suser to stop samba corectly?

Anil
There is no substitute to HARDWORK
Sundar_7
Honored Contributor

Re: Sudo with Samba

I believe you need to get your /etc/sudoers config straight.

# grep "username" /etc/sudoers

You need to explicitly define the commands the user is allowed to execute as root. if you don├в t have ALL=ALL next to the user then you probably need to add stopsmb to the list of commands the user is allowed to execute as root
Learn What to do ,How to do and more importantly When to do ?
Pradeep_19
New Member

Re: Sudo with Samba

Sanjay...
U'r suggestion worked...

thanks
-pradeep