Skip to content

Lua Script with os.execute("sudo ...") does not work due to sudo "no new privileges" #9

Answered by jcorporation
jdr85 asked this question in Q&A
Discussion options

You must be logged in to vote

The NoNewPrivileges is implied also by user=.

The only workaround I know, is to override the complete mympd.service file and add the mympd user manually.

groupadd -r mympd
useradd -r -g mympd -s /bin/false -d /var/lib/mympd mympd

curl -s https://raw.githubusercontent.com/jcorporation/myMPD/v10.0.0/contrib/initscripts/mympd.service.in | sed 's|@CMAKE_INSTALL_FULL_BINDIR@|/usr/bin|'> /etc/systemd/system/mympd.service

Replies: 0 comments 17 replies

Comment options

You must be logged in to vote
1 reply
@jdr85
Comment options

Comment options

You must be logged in to vote
2 replies
@jdr85
Comment options

@jcorporation
Comment options

Answer selected by jcorporation
Comment options

You must be logged in to vote
4 replies
@jcorporation
Comment options

@Emilot
Comment options

@jcorporation
Comment options

@Emilot
Comment options

Comment options

You must be logged in to vote
5 replies
@jcorporation
Comment options

@Emilot
Comment options

@pgzh
Comment options

@jcorporation
Comment options

@pgzh
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants