Posts

Showing posts from February 7, 2019

Is it possible for root to execute a command as non-root?

Image
10 3 I am a root user, and suppose I want to run any application as another user. Is this possible, without switching to another user? Something like # google-chrome user=abc I am actually executing a CLI program as a non-root user. I have set the sticky bit on and I am using setuid, so the program runs with root privileges. Now I am using system() within the program to invoke a GUI app. But I don't want to run it as root, so I want to temporarily drop root privileges only for that call. linux user su share | improve this question edited Jun 17 '17 at 18:26 Glorfindel 1,384 ...