1. Knowledge Base
  2. Zmanda Recovery Manager (ZRM)

Sorry, you must have a tty to run sudo

This article is for Zmanda Recovery Manager For MySQL (ZRM)

Issue Symptoms

- Output of command: '/usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action get-vm-device-details --directory "/opt/zmc/mysql/data//zmc" --sname zrmZEvH6X 2>/tmp/AjfR1QlY3J' is [
- sudo: sorry, you must have a tty to run sudo
- Failed to find database: /opt/zmc/mysql/data//zmc
]
WARNINGS:
- Error getting device details for "/opt/zmc/mysql/data//zmc"
- Could not read file /tmp/AjfR1QlY3J

Issue Description

The sudo configuration is requiring the mysql user to run sudo only from a login shell.

Resolution

As root, run 'visudo' and add the following lines to allow the mysql user to run sudo without requiring a TTY :

Defaults:%mysql !requiretty
Defaults:mysql !requiretty