1752745 Members
4802 Online
108789 Solutions
New Discussion юеВ

Re: Sudo setup

 
Visweswara R Madhavarap
Occasional Contributor

Sudo setup

I have installaed the sudo package on hp-ux 11.11 Server for su access to the user 'madhavav'

# swlist -l product |grep -i sudo
sudo 1.8.1p1 Provide limited super-user priveleges to specific users

I have added the following Entries in /etc/sudoers

User_alias ADMIN = madhavav
ADMIN ALL =(ALL) ALL
Cmnd_Alias SU = /usr/bin/su

but when su - madhava and ran the following two commands

1) sudo -l
2) sudo su -

I am getting following error messages

$ sudo su -
sudo: >>> /etc/sudoers: syntax error near line 24 <<<
sudo: parse error in /etc/sudoers near line 24
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
$ ^C
$ sudo -l
sudo: >>> /etc/sudoers: syntax error near line 24 <<<
sudo: parse error in /etc/sudoers near line 24
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin


Please help me if need any necessary changes.









6 REPLIES 6
Bob_Vance
Esteemed Contributor

Re: Sudo setup

>>> /etc/sudoers: syntax error near line 24 <<<


Well, what's near line 24 ?

can you give us a

## cat /etc/sudoers


bv
"The lyf so short, the craft so long to lerne." - Chaucer
Bob_Vance
Esteemed Contributor

Re: Sudo setup

uv got

User_alias

should be

User_Alias

bv
"The lyf so short, the craft so long to lerne." - Chaucer
Wilfred Chau_1
Respected Contributor

Re: Sudo setup

how did you edit sudoers?

if you just vi the file, try use visudo and enter the text again.
Bob_Vance
Esteemed Contributor

Re: Sudo setup

His problem is that User_Alias is case-sensitive and he had
User_alias
---------^^^


bv
"The lyf so short, the craft so long to lerne." - Chaucer
Bill Hassell
Honored Contributor

Re: Sudo setup

Do not use vi to edit the file. The sudoers file states this warning at the top. The reason to use visudo is that it will always check what you added/changed and show the errors when you try to exit.


Bill Hassell, sysadmin
AwadheshPandey
Honored Contributor

Re: Sudo setup

please configure
Host_Alias
User_Alias
Cmnd_Alias
and
# User privilege specification
User_Alias Host_Alias = Cmnd_Alias
It's kind of fun to do the impossible