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.

Filter by
Sorted by
Tagged with
0
votes
1answer
15 views

Centos SSH & SFTP user restriction to specific directories

I am managing a server running Cantos 7. Some users login to the server via ssh/sftp for development. For them i have created a user devel. For security reasons, i need to confine them to certain ...
-1
votes
2answers
46 views

Limit User To Run Specific Commands

I have a user test1 that i want to limit it to only run specific commands. I found this solution and I tested it (logged in with test1 and ran some random commands. none of them worked but date) and ...
0
votes
1answer
110 views

AIX restricted shell add entry to inittab

Need a help in adding an entry to the AIX inittab on VIO server. The VIO server is a restricted shell, to add entry to the inittab we need to access the root shell using command: oem_setup_env. I'm ...
3
votes
1answer
141 views

Why does rbash not apply any restrictions for a login shell on Debian 9 (Stretch)?

I am on Debian 9 (Stretch). I have a deploy user where I've set the shell to /bin/rbash. Here is the line from /etc/passwd: deploy:x:9000:9000::/home/deploy:/bin/rbash If I am the root user, and I ...
0
votes
0answers
14 views

where to check list of commands allowed for unix server user [duplicate]

I like to see what are the commands allowed or restricted for the user in unix. [user8@Test1 ~]$ cd -rbash: cd: restricted where i can able to find that information or any command available to see ...
0
votes
0answers
39 views

Restrict root shell access

Background : 1. I have two users admin and root. admin user is not in sudoers and only runs a menu of restricted commands. 2. root account access is restricted to shell based protocols like scp, ssh ...
1
vote
1answer
383 views

Restrict SFTP user to run only limited set of commands/action in Linux

How to restrict SFTP users to run only limited set of commands/actions. For users connected to shell there is a option to configure restricted shell. Once done user can run only allowed commands. e....
0
votes
1answer
547 views

Remote Commands and Restricted Shells via SSH

I'm working on an ssh server where the only thing I ever want the user doing is ssh user@ip cat somefile Part of my threat mitigation plan was to give the user restricted bash I've seen examples ...
0
votes
1answer
245 views

How to create a restricted shell for a specific user

I'm trying to create a restricted shell for a maintenance user. This user should only be allowed to execute a single bash script within his home folder. The user should not be allowed to execute any ...
0
votes
0answers
23 views

Allow only rdesktop client on Raspberry Pi

I have an internet connected windows PC thats part of a domain with full controls and restrictions. I have been asked to provide internet connection to another room. There are quite a few ...
1
vote
1answer
2k views

How can I restrict the normal user to run only limited set of commands in RHEL?

How can I restrict the Normal user to run the only limited set of commands in RHEL?
5
votes
1answer
3k views

Why does “echo os.system('/bin/bash')” work?

I was doing a kind of hacking challenge, a part of which found me stuck inside a restricted shell which had very few commands. One of the available commands was echo. After a few hours of banging my ...
-3
votes
1answer
2k views

Not able to Run cd command with restricted user!

I have restricted a normal user to limited commands using rbash, now am not able to cd (change directory) to other directory,can someone help me how can i run cd command with restricted user, please ...
0
votes
1answer
131 views

Running code when /bin/sh has no rights

I've obtained a shell on an embeded device, a /bin/sh shell, but it is extremely limited; It just allows me to run a few commands with specific arguments, like ifconfig, or iptables, or cat (but not ...
0
votes
1answer
233 views

rbash for ssh ldap users

I have some ssh ldap users who connect to my server (centos7) for reset their password. I would like they use rbash for execute passwd command but I don't know how to do. I can't add rbash to /etc/...
1
vote
1answer
956 views

What's the usage of rbash?

I've read some questions about the difference of TTY, console, terminal, etc here and on Askubuntu. Someone mentioned restricted shell, like rbash or bash -r. I first fought it is good to give ...
2
votes
2answers
7k views

Make sshd override login shell of a group of users

My users are shared across a number of machines via LDAP. For one of those machines (let's call it 'fileserf'), I would like to restrict some users in what they can do (actually: prevent them from ...
2
votes
1answer
3k views

NOEXEC and RESTRICT in sudoers

I understand the script below has a serious problem, and NOEXEC and RESTRICT are not enough as a solution to this. user ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf However, I still have some ...
3
votes
1answer
606 views

Is there an alternative to using rbash to restrict a user on my system?

Basically at the moment I am using rbash to stop a user from leaving his directory on my system. The problem with this is, there is a script in my bin which he needs to be able to run from a script in ...
27
votes
5answers
37k views

Block Particular Command in Linux for Specific user

How to block command, let say mkdir for specific user ? What I did just created read-only function and store in users profile ~/.bashrc /bin/mkdir() { echo "mkdir command not allow for you" ...
6
votes
2answers
8k views

How to discard stderr in restricted Bash shell?

In my .bashrc there are a couple commands which redirect standard error to /dev/null, and this is not allowed within rbash: bash: /dev/null: restricted: cannot redirect output Is there some way to ...
2
votes
1answer
5k views

Bash restricted Shell using rbash

I am using /bin/rbash for some users. It's working as expected but there is some hack like when users run bash or dash, then they got unrestricted shells, so to avoid these commands, I have added ...