Answer the question
In order to leave comments, you need to log in
How to run a bash command as su in Go?
As in the program, execute the bash command: log in as su user ..?
cmd := exec.Command("mate-terminal","-e","su -c ls")
cmd.Run()
Opens terminal cono and waits for password...
How to programmatically enter password and then some commands ?
sudo password is not set, you cannot make changes to sudoers.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question