[Gambas-user] An Issue With Shell command and sudoers rules
Jorge Carrión
shordi at ...626...
Thu May 25 10:16:59 CEST 2017
In our company, users are "standard" users, they can't update or make
administratives jobs. There is another user (the admin user) that can do
all that things... but users doesn't know the admin password.
Searching make standard users being able of update the sistem I've created
this script
on adminuser home /home/adminuser/bin/comando.sh
#!/bin/bash
echo $1|sudo -S $2
And I've add a new rules file in sudoers.d like this
Cmnd_Alias COMANDO = /home/adminuser/bin/comando.sh
ALL ALL = (adminuser) NOPASSWD:COMANDO
If you, as a non-sudoer user, type on a terminal
/home/administrador/bin/comando.sh adminpassword /usr/bin/apt update
works fine... but, *and this is the issue*, if you do the same from a
Gambas Shell command, doesn't work. Gamba's console show that the script is
asking for you (non sudoer) password and fails.
Seems that Gambas shell doesn't mind of sudoers directives. I am missing
something?
Best Regards
More information about the User
mailing list