“su” does not work on FreeBSD

Below I sun “su” command on FreeBSD:

FreeBSD rand.vstyle.local 9.0-RELEASE FreeBSD 9.0-RELEASE #0 amd64

This is server RAND :)

[svn@rand ~]$ su logostudiotest1 /bin/ls
Password:
/bin/ls: /bin/ls: cannot execute binary file

Why “su” does not work?!

Answer

According to the su manpage if you want to run a command as another user using su, you should use the -c switch.

For example: su logostudiotest1 -c /bin/ls

Attribution
Source : Link , Question Author : porton , Answer Author : MDMarra

Leave a Comment