Score:0

deny access to Python as normal user

ma flag

im seeking for some scripts that deny access to the app python in my PC. example: a new user with low privileges can call python without type sudo or su, i wanna prevent this kind of situation by the same way that hosted users could start python without restrictions.

user535733 avatar
cn flag
For general purpose use, there is no need to deny non-admin users access to Python. Python scripts are not a security hole. If a user lacking admin permission to use `sudo` calls a Python script that requires admin permission, the script will fail with a `permission denied` error. If you discover a way for non-admin users to abuse Python to gain admin access, please file a bug report and subscribe the Ubuntu Security Team to that bug.
Score:0
tk flag

You are most likely looking for a restricted shell - the setup of which has been described in depth within this answer. This allows only executables that can be found on the PATH (where you could exclude the python binary from for that specific user).

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.