Score:0

Ubuntu - restrict user permissions to execute scripts

ng flag

I need some users in my Ubuntu box to only be able to run some Python scripts, which are located in /home/ubuntu/scripts

I have created users with rbash and symlinked a simple bash script to the restricted user home directory:

python3 /home/ubuntu/scripts/script.py

When users try to execute the bash script they get:

/home/username/bashscript.sh    
-rbash: /usr/lib/command-not-found: restricted: cannot specify `/' in command names

What's an effective way to allow them to only be able to execute the scripts?

Cyrus avatar
in flag
I suggest to add this to `~/.bashrc`: `unset command_not_found_handle`
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.