LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem with sudo on centos (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-sudo-on-centos-4175546806/)

florek 06-30-2015 08:21 AM

problem with sudo on centos
 
Hello world,
I am installing webacula for web administration of bacula. I have encountered a problem while doing this command:
su -l apache -s /bin/sh -c "/usr/bin/sudo /opt/bacula/sbin/bconsole -n -c /opt/bacula/etc/bconsole.conf"

the console message shows this:
sudo: sorry, you must have a tty to run sudo

I don't know how to solve it. Please, can anyone helps me!!
Thank you,

berndbausch 06-30-2015 09:42 PM

Quote:

Originally Posted by florek (Post 5385006)
sudo: sorry, you must have a tty to run sudo

Google to the rescue!

A web search for your error comes back with a nice list of possible solutions. For example, this one seems to apply: http://www.cyberciti.biz/faq/linux-u...-haveattytorun.

frankbell 06-30-2015 10:16 PM

I'm not sure it bears directly on your issue, but be aware that most distros, other than Ubuntu and its derivatives, do not share Ubuntu's sudo fetish; the sudoers file is not configured out of the box. CentOS is one of "most distros."

Most distros expect you to use su; if you absolutely must use sudo, you must configure sudoers accordingly using the visudo command.


All times are GMT -5. The time now is 02:14 AM.