![]() re-write it in golang and use setuid bit. If you don't you will be back here asking how to edit the file, when sudo is not working. Be careful to read the bit on visudo (and how not to get your self locked out). # Identify the username of the logged-in userĬurrentUser=`python -c 'from SystemConfiguration import SCDynamicStoreCopåonsoleUser import sys username = (SCDynamicStoreCopåonsoleUser(None, None, None) or ) username = ] sys.stdout. read man sudoers, and register the script with sudo as not needing a password to run by you. But, if you insist for some uncontrolled reason, just add next line after you setup normal user: RUN echo sudo ALL (ALL) NOPASSWD:ALL > /etc/sudoers. You could well design your behavior using USER + gosu. I've included security features to prevent users from editing System Preferences, attempting to remove the Jamf Binary, and editing the sudoers file. First, you are not suggested to use sudo in docker.Like a RunasSpec, the NOPASSWD tag sets a default for the commands that follow it in the CmndSpecList. ![]() This behavior can be modified via the NOPASSWD tag. pmset shutdown Usage: pmset See pmset (1) for details: man pmset. NOPASSWD and PASSWD By default, sudo requires that a user authenticate him or herself before running a command.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |