linuxrootcentos5

"basename: missing operand" on su command


I've added superuser sroot with the following command.

useradd -o -r -c "service root" -g 0 -u 0 -m -d /root -s /bin/bash sroot

When I try to switch to that user I get the following:

[admin@machine ~]$ su - sroot
Password:
TERM=[xterm-r6]?
basename: missing operand
Try `basename --help' for more information.

whoami shows that I'm root now but commands that requires root access still cannot be executed. When I login under usual root everything works fine.

[admin@machine ~]$ uname -a
Linux <myhostname> 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44 EDT 2010 i686 i686 i386 GNU/Linux

Thanks in advance!


Solution

  • Well, I tested with non-standard linux commands, but with scripts added with installed rpm. Those commands check $LOGNAME variable and require to be root only, not sroot. Thanks @thatotherguy for your comment, which directed me to the right path to search.