Do I need 2 sudos
Alek O. Komarnitsky (N-CSC)
alek at ast.lmco.com
Tue Apr 4 11:48:04 EDT 2000
> From: "Todd C. Miller" <Todd.Miller at courtesan.com>
> Subject: Re: Do I need 2 sudos
> To: kamala <kamala at rsa.ericsson.se>
> Cc: sudo-users at courtesan.com
>
> You can certainly have just one sudoers file for multiple architectures.
> We have 8 different OSs (some of which run on multiple cpus) with
> a single sudoers file. The paths to system programs on HP-UX and
> Solaris are not always the same but that's not hard to deal with.
>
> - todd
FYI FWIW: The sudo "slide show" available from www.courtesan.com/sudo/
mentions dealing with heterogeneous environments exactly like Todd said above.
There is also a link to the wrapper script which is included below.
Note that wrappers can be written bazillions of way ... so this is just
one example and I don't claim it is neccessarily the "best" way ...
but it works.
BTW, I'm kinda surprised you aren't using wrappers already for other stuff (?)
alek
#!/bin/sh
OS=`uname -s | sed -e 's/-//'`
OSREL=`uname -r | sed -e 's/^[A-Z]*//' -e 's/^\.//' -e 's/\..*$//'`
if [ "$OS" = "IRIX64" ]; then OS=IRIX; fi
if [ "$OS" = "AIX" ]; then
OSREL=`uname -v`
OSMIN=`uname -r`
fi
OSTYPE=$OS$OSREL
DIR=/appl/sudo
CMD=`basename $0`
RUNCMD=$DIR/$OSTYPE/bin/$CMD
PATH=$DIR/$OSTYPE/bin:${PATH}; export PATH
if [ -x $RUNCMD ]; then
exec $CMD ${1+"$@"}
else
echo "could not find $RUNCMD"
fi
More information about the sudo-users
mailing list