cancel
Showing results for 
Search instead for 
Did you mean: 

visudo problem

 
Arumugavel_P
Occasional Advisor

visudo problem

Hi All,

 

I am facing the issue with sudo in my hp-ux boxes (11.31). Everthing looks fine, but when I do visudo, it is not pointing to /etc/sudoers file. It points to /opt/iexpress/sudo/etc/sudoers file. But still i can edit /etc/sudoers file with visudo by -f option. But I wanted to know what could be the issue in configuration. please help.

 

Thankls in Advance.

 

Rgds...

4 REPLIES
Matti_Kurkela
Honored Contributor

Re: visudo problem

If you're using the sudo package from the HP-UX Internet Express, it places the sudoers file to /opt/iexpress/sudo/etc/sudoers instead of /etc/sudoers. If you use the sudo command from the Internet Express, you'll find it won't read /etc/sudoers at all: it reads /opt/iexpress/sudo/etc/sudoers instead.

 

This is a compile-time configuration choice made by HP.

 

The Internet Express sudo package installs sudo as a symbolic link /usr/bin/sudo -> /opt/iexpress/sudo/bin/sudo.

If you have another version of sudo installed from another source (e.g. from http://hpux.connect.org.uk ) it might have been installed to /usr/local/bin. If your PATH has /usr/local/bin before /usr/bin, the sudo in /usr/local/bin will be used, causing much confusion.

 

Always make sure you have only one version of sudo installed at a time. If you need to switch from hpux.connect.org.uk version to Internet Express version or vice versa: explicitly remove the old version of sudo before installing the new one. Because the Internet Express sudo has its swinstall product name set to "ixSudo" and the hpux.connect.org.uk version has product name "sudo", swinstall will assume these are completely separate products which have nothing to do with each other.

MK
Jeff_Traigle
Honored Contributor

Re: visudo problem

It doesn't sound like an issue at all. As MK stated, HP's bundle installs under /opt/iexpress/sudo. It creates the symlink /etc/sudoers pointing to the actual file, /opt/iexpress/sudo/etc/sudoers.

--
Jeff Traigle
Arumugavel_P
Occasional Advisor

Re: visudo problem

Hi Jeff,

OK, then if I do changes in visudo, it should affect /etc/sudoers. But it doesn't.

I want to know, when I do sudo login, my permission would be referred from /etc/sudoers file or ?

 

Rgds..

Jeff_Traigle
Honored Contributor

Re: visudo problem

You're saying your /etc/sudoers is a file instead of a symlink to /opt/iexpress/sudo/etc/sudoers? If so, only changes to /opt/iexpress/sudo/etc/sudoers are going to matter. I think the symlink exists just to allow people who expect it to be in /etc to easily determine where the file really exists.

--
Jeff Traigle