[sudo-users] mysqldump without sh -c ?

Jordi Espasa Clofent jespasac at minibofh.org
Wed Aug 12 06:42:49 EDT 2009

Hi all,

My workmates of support deptartment need very often to make dump/and 
restores of MySQL customers databases; because of it, I've given to them 
access to /bin/sh binary, so they can execute the next commands:

$ sudo sh -c "mysqldump --opt -u user -ppassword  > 
$ sudo sh -c "mysql -u <user> -ppassword> < /parh/backup_db/backup.sql"

Unfortunately, they can do a simple:

$ sudo sh -c "su"

or any other command using "sudo sh -c <command>"

¿Any workaround to avoid this?

Jordi Espasa Clofent

More information about the sudo-users mailing list