dslreports logo
 
    All Forums Hot Topics Gallery
spc
Search similar:


uniqs
673
tld
join:2002-12-19

tld

Member

Question on AIX sudo implementation

I'd like to verify something about the implementation of the sudo command on AIX, and I currently don't have access to one in order to test this. If anyone could answer this one, it'd really help:

I need to know if the -p (to specify a password prompt) work in conjunction with a command. For example:

sudo -p 'my-password-prompt' <command>

In the past I recall finding various differences in the way sudo works on AIX vs Linux and others. For example, the -k option (to kill any cached password) can be used in conjunction with a command on Linux, for example:

sudo -k <command>

...whereas AIX only allows -k to be used by itself with no command.

If anyone can verify whether that -p syntax above works, I'd greatly appreciate it. Thanks!

Tom

Exodus
Your Daddy
Premium Member
join:2001-11-26
Earth

Exodus

Premium Member

»unixhelp.ed.ac.uk/CGI/ma ··· cgi?sudo

That might help.
tld
join:2002-12-19

tld

Member

Thanks! That seems to read almost identically to the Linux man page, and would seem to indicate that the -p prompt command syntax would work. However I tend not to trust it, because the section for -k also says that that can be used with a command as I can in Linux, and I know from experience that that does NOT work on AIX...at least not on those systems I've been able to try.
tld

tld

Member

If anyone has access to an AIX system and could verify if that first syntax using the -p option, it'd be greatly appreciated. Thanks!

journeysquid
join:2014-08-01

journeysquid to tld

Member

to tld
Is sudo included in AIX by default? I did a search on IBM's AIX documentation site and the closest thing in their command list was su (which can run a command, of course).

»www-01.ibm.com/support/k ··· /welcome

Exodus
Your Daddy
Premium Member
join:2001-11-26
Earth

Exodus

Premium Member

Older versions of AIX don't have sudo... like 4.3. But I'm pretty sure I can sudo on 5.3. I'm positive I can sudo on 6.1 and 7.1
Shady Bimmer
Premium Member
join:2001-12-03

Shady Bimmer

Premium Member

said by Exodus:

I'm pretty sure I can sudo on 5.3. I'm positive I can sudo on 6.1 and 7.1

sudo is provided as part of the AIX Toolbox for Linux Applications and is not part of the AIX distribution. The toolbox is provided 'as-is' and has no support whatsoever from IBM. If it is available on your AIX installs it is because it was explicitly downloaded and added from the toolbox.
tld
join:2002-12-19

tld

Member

said by Shady Bimmer:

sudo is provided as part of the AIX Toolbox for Linux Applications and is not part of the AIX distribution. The toolbox is provided 'as-is' and has no support whatsoever from IBM. If it is available on your AIX installs it is because it was explicitly downloaded and added from the toolbox.

Ahh...very interesting, Thanks for that. That probably explains why it's hard to find any information about it.

In any case, if anyone has a access to an AIX system with that installed, I'd love to know if the above syntax with the -p option works.

Thanks again!

ropeguru
Premium Member
join:2001-01-25
Mechanicsville, VA

ropeguru to tld

Premium Member

to tld
Just had an AIX admin here test you sudo and it appears to work as expected.

Entering "sudo -p 'mytestprompt' " yield a password prompt of "mytestprompt".

AIX 6.1
tld
join:2002-12-19

tld

Member

Thanks!...that tells me what I needed to know.