Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have set up a VM using turnkey linux redmine and I'm trying to SSH into the server to install some more items.

It doesn't appear to be recognizing the sudo command. Every time I try to sudo something I get an error saying:

 -bash: sudo: command not found

I read somewhere else to type 'whereis sudo' and the output was:

 sudo:

Not sure what that does, but im hoping it might help in the diagnostic :-)

Thanks for your help, Adam

share|improve this question

migrated from askubuntu.com Oct 29 '11 at 21:21

This question came from our site for Ubuntu users and developers.

3 Answers 3

up vote 7 down vote accepted

It looks from http://www.turnkeylinux.org/redmine like Redmine, unlike Ubuntu, does not use sudo by default. What username are you using to SSH in? If it's root, then you don't need to use sudo, as everything you do when SSHed in to the Redmine system is done as root. If it's something else, like admin, then you could try using the su command to get a root shell in which to run commands as root.

share|improve this answer

Maybe it isn't installed? Open your package manager and install the sudo package.

share|improve this answer
1  
It wasn't installed! Thanks. I'm pretty new to Linux and just assumed it was on all installations. Do i just need the sudo package or sudo-ldap as well? –  Adam Oct 29 '11 at 17:14
2  
You don't need the sudo-ldap package. Sudo works fine on my computer and I don't have sudo-ldap installed. –  Azendale Oct 29 '11 at 17:20

try to use full path

/usr/bin/sudo

if that command work then include /usr/bin/ in your env variable PATH in ~/.bashrc

echo "export PATH="$PATH:/usr/bin"" >> ~/.bashrc

hopefully works ..

share|improve this answer
2  
That's very unlikely to be the problem; /usr/bin is almost certainly going to be in your default path. The problem, as indicated by other answers and comments, is that the sudo command wasn't installed at all. –  Keith Thompson Oct 29 '11 at 22:25

Your Answer

 
discard

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