Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
/bin/ls: /bin/ls: cannot execute binary file

Why "su" does not work?!

share|improve this question
Silly question, maybe, but can you run /bin/ls as any other user? – Jeff Albert Feb 4 '13 at 18:14
2 (did you read the man page?) – Luke404 Feb 4 '13 at 22:38

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

share|improve this answer
Yeah, this. The command given in the question won't work on Linux either. – mattdm Feb 4 '13 at 19:32
ls makes a lousy shell. – David Schwartz Feb 5 '13 at 1:04

I think you've confused su with sudo. This should work fine:

# sudo -u logostudiotest1 /bin/ls
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.