[Gambas-user] An Issue With Shell command and sudoers rules

Jorge Carrión shordi at ...626...
Thu May 25 11:13:04 CEST 2017


Oh... well, I'm afraid that I've a mistake.

All of this isn't a gambas issue.

BUT if someone knows a way to let a non-sudoer user to update the system
without know the admin password I'll be very grateful .

Sorry for the noise.

Best Regards


2017-05-25 10:16 GMT+02:00 Jorge Carrión <shordi at ...626...>:

> 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