0

Actually, my root have to aliases:

alias unpool='/path/to/my/scripts/unpool.sh'
alias pool='/path/to/my/scripts/pool.sh'

I have the same for my user in ~/.bashrc

I defined my /etc/sudoers.d/user with

user ALL=(root) NOPASSWD: /bin/cp
user ALL=(root) NOPASSWD: /path/to/my/scripts/pool.sh
user ALL=(root) NOPASSWD: /path/to/my/scripts/unpool.sh

But logged with my user, I can't do sudo unpool, it ask me my password

What can I do ?

2
  • 2
    Your shell would need to first expand that alias and pass the fully qualified command path to sudo. Simpler might be alias unpool='sudo /path/to...'
    – thrig
    Aug 26, 2015 at 16:24
  • I believe it should say ALL=(ALL) not ALL=(root).
    – alexus
    Aug 26, 2015 at 16:31

0

You must log in to answer this question.

Browse other questions tagged .