Questions tagged [restricted-shell]
The restricted shell is a Unix shell that restricts some of the capabilities available to an interactive user session, or to a shell script, running within it.
35 questions
0
votes
2
answers
185
views
How can I set a restricted shell for a user, while allowing cd to user-owned directories?
I've setup restricted shell(s) on an Arch-based system by creating /usr/local/bin/rzsh and /usr/local/bin/rbash:
these scripts cd into /home/$USER and then invoke zsh -r and bash -r respectively, but ...
1
vote
1
answer
518
views
How can I allow scp to a user whose login shell is a restricted shell via rbash
Hi I have a login shell via /bin/rbash
However i cannot scp to the home directory.
Is there anyway to solve this?
scp /tmp/x user@ip:/home/ubuntu/x
how to make above work when user always gets a ...
1
vote
0
answers
161
views
Block Particular Command in Linux for Specific Users
I want to whitelist some of the commands for users. I am getting solution using LShell Limited Shell but I want to restrict subcommands as well.
I want user to access docker ps and docker logs only. ...
0
votes
0
answers
107
views
Restrict user for ssh tunnelling
I'm trying to create a user without shell access just for port forwarding through ssh. The shell of the user is set to /usr/bin/false, but everytime i try to login through ssh it receive Permission ...
2
votes
0
answers
243
views
How to re-enable the `enable` command?
As part of a script to set up a restricted user, I ran the enable -n enable command. For testing purposes I would like to undo that command but I can't find any documentation on how to do so. I know ...
1
vote
2
answers
2k
views
How to restrict a jump user (into openSSH jumpbox) to only SSH to another server?
My Goal:
restrict a jump users (into OpenSSH jumpbox) to only SSH to another server. Users should not be able to list directories, cd or anything else except ssh from jumpbox to another server.
What I ...
-3
votes
2
answers
184
views
Linux Restricted Bash shell perform arithmetic calculations [duplicate]
I have a shell script to calculate cpu and memory resources in a vm. For one task, I would like to perform mathematical calculations in a rbash shell. Could you please guide me the possible ...
2
votes
1
answer
485
views
Restricted shell rush "invalid uid" error
I am setting up a new local account on a Debian buster server. The account name is "auto-upload". The entry in /etc/passwd looks like this:
auto-upload:x:1060:1060:auto-upload:/home/auto-...
2
votes
1
answer
368
views
How can I start a login shell with options?
I am messing around and want to have a guest user whose login shell is a restricted one like rbash. Unfortunately there is no rbash executable anywhere on my Slackware installation, so I have to do ...
0
votes
0
answers
17
views
Remote access to a Minecraft server over SSH [duplicate]
I have a dedicated server running Ubuntu Server 18.04. I'm going to be hosting a Minecraft server for someone. What's the best way to restrict their read, write, and execute access to only the ...
1
vote
1
answer
811
views
How to restrict users so that they can only execute commands from /bin?
I was provided an assignment with several questions. One of the questions is:
How to restrict users can only execute the commands in the directory /bin?
I tried to solve it by using the following ...
0
votes
0
answers
45
views
How to limit user to only cat & exit commands? [duplicate]
I would like to limit a user to only two commands: cat and exit.
I've tried to edit visudo but it does not work.
My OS version is CentOS 8.
1
vote
1
answer
2k
views
How do you install rbash in CentOS 7?
I ran this command:
yum install rbash
And for some reason it told me that the package wasn't available. It didn't come pre-installed on my system either and when I looked it up I was unable to find ...
1
vote
1
answer
401
views
Restrict users shell in CentOS-7
I've deployed CentOS-7 login nodes for users, I want restrict them in resources and command level to prevent nasty activities, so far my search only ended up to rbash and lshell and etc..., is there ...
0
votes
1
answer
630
views
Giving users Shell access with heavy restrictions
I am developing an in-house file-sharing system like Google Drive/Dropbox with very restricted shell access to users' own folder. The users have to be able to use mv ssh ls cd commands to access and ...