I have just encountered a weird message by /bin/su:
master:/tmp# su -c id collector
su: Permission denied
(Ignored)
uid=200(collector) gid=200(collector) groups=200(collector)
root su's to the collector user (pam_rootok allows this), and the
command is executed. But where do the messages come from.
strace says:
[...]
stat64("/root", {st_mode=S_IFDIR|0700, st_size=116, ...}) = 0
stat64(".", 0xbffffa00) = -1 EACCES (Permission denied)
brk(0) = 0x80ec000
brk(0x80ee000) = 0x80ee000
getcwd("/root", 4096) = 6
getpid() = 15728
getppid() = 15727
stat64(".", 0xbffffa30) = -1 EACCES (Permission denied)