Following simple test program confuses me on Solaris 9/10:
--($ ~)-- cat _X_
if [ -x /etc/passwd ]; then
# EOF #
$ ls -al /etc/passwd
-r--r--r-- 1 root sys 1211 Jun 10 09:52 /etc/passwd
When I run that program on Solaris 9 or 10, it prints "no" when I'm a
BUT: When I run that program as root (eg. with "sudo bash _X_"), then
it prints "yes". Why's that so?
--($ ~)-- sudo /etc/passwd
sudo: /etc/passwd: command not found
Seems that the program wasn't executable?!
When I run _X_ on a Linux system, it always prints "no", even when run
as root. That's the behaviour I'd expect.