Skip to content

sudo: sorry, you must have a tty to run sudo

It took me a while to find out, why this backup script would not start. Finally, i found this error message: "sudo: sorry, you must have a tty to run sudo". The sudo call is required to execute "clustat" and find out, which machine is the current master.

sudo is configured to execute "clustat" without password and works fine on the command line - so what's wrong here?


The solution is easy: some distributions enable the setting "requiretty". This looks like:

Defaults requiretty

in visudo. After commenting out this setting (you must be root for doing this), my cronjob started without any trouble.

  • Twitter
  • Bookmark sudo: sorry, you must have a tty to run sudo at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg sudo: sorry, you must have a tty to run sudo
  • Bloglines sudo: sorry, you must have a tty to run sudo
  • Technorati sudo: sorry, you must have a tty to run sudo
  • Fark this: sudo: sorry, you must have a tty to run sudo
  • Bookmark sudo: sorry, you must have a tty to run sudo at YahooMyWeb
  • Bookmark sudo: sorry, you must have a tty to run sudo at Furl.net
  • Bookmark sudo: sorry, you must have a tty to run sudo at reddit.com
  • Bookmark sudo: sorry, you must have a tty to run sudo at blinklist.com
  • Bookmark sudo: sorry, you must have a tty to run sudo at Spurl.net
  • Bookmark sudo: sorry, you must have a tty to run sudo at Simpy.com
  • Bookmark sudo: sorry, you must have a tty to run sudo at blogmarks
  • Bookmark sudo: sorry, you must have a tty to run sudo with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.
Form options