F
F
Fisab2016-02-07 00:58:26
linux
Fisab, 2016-02-07 00:58:26

I can't run cowsay and xcowsay as another user, what should I do?

I can't run cowsay and xcowsay as a different user.
sudo -u username cowsay hello
Output:
sudo: cowsay: command not found
The same if through gksu, gksudo or if sudo -u username -s cowsay hello
Well, the same thing with the xcowsay package, although it runs as your user
Can you tell me?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nathanael, 2016-02-07
@Fisab

The default superuser does not have "games" in PATH.
Quick fix: see where the cowsay binary is and run it as root directly:

$ which cowsay
/usr/games/cowsay

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question