disable bash


 
Thread Tools Search this Thread
Operating Systems AIX disable bash
# 1  
Old 05-25-2011
disable bash

Hi,

is there a way to disable bash shell only for specific users?
# 2  
Old 05-25-2011
you can put them in a same group and change the environment .profile for that group.
# 3  
Old 05-25-2011
But this does not prevent a user from calling bash inside his default shell or from a script.
# 4  
Old 05-25-2011
for ex our user is test.

add a group which named bashxx
Code:
# groupadd bashxx

and add user to group
Code:
# usermod -G bashxx,test test

and mount with acl
Code:
# mount -o remount -o defaults,acl  /

and be sure that there is not perm on bash
Code:
# setfacl -m g:bashxx:0 `which bash`

and they must not dowload any source file about bash
Code:
# su - test
$ bash
-ksh: bash: cannot execute [Permission denied]

after that for another users same process goes on..
Code:
# usermod -G bashxx,test2 test2

and then again for another users...

of course they should not dowload any source file about bash Smilie

regards
ygemici
This User Gave Thanks to ygemici For This Post:
# 5  
Old 05-25-2011
Quote:
Originally Posted by firefox111
is there a way to disable bash shell only for specific users?
It is the other way round: ENable specific users for the shell:

- create a group "bashusers"
- remove read/write/execute-bit from $(which bash) for world, set execute- and read-bit for group
- give group ownership of $(which bash) to group "bashusers"
- put everybody allowed to use bash into this group

This way you have disabled the usage of bash for all users not member of "bashusers". Of course you can't effectively disable it for user "root".

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 6  
Old 05-26-2011
I managed it with AIX ACL's:

Help -
Thanks.
# 7  
Old 05-26-2011
Quote:
Originally Posted by firefox111
I managed it with AIX ACL's:
Thanks for writing a follow-up.

Still, i'd like to warn you to think twice about using ACLs: in my experience using ACLs is uncessarily complicating the rights management process and in the long run it is better to stay away from using ACLs at all.

In most cases you can achieve your goals without ACLs and if this is possible you should go for it.

Just my 2 cents.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script unable to disable expected output

I'm trying to understand why a script behaves different when run through a pipe. My OS: Linux myip 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:42:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux This script (myscript.sh): #!/bin/bash echo whoami: whoami echo who: who echo who... (2 Replies)
Discussion started by: SkySmart
2 Replies

2. Linux

Printer is getting disable...

Dear expert, I have configured the printer on my linux server, Daily its getting disable and user cannot access the printer. Request you to please help me on this, Attached the screen shot. Thank you, Faiz. (2 Replies)
Discussion started by: Mohammed Faiz
2 Replies

3. Red Hat

SSL/TLS renegotiation DoS -how to disable? Is it advisable to disable?

Hi all Expertise, I have following issue to solve, SSL / TLS Renegotiation DoS (low) 222.225.12.13 Ease of Exploitation Moderate Port 443/tcp Family Miscellaneous Following is the problem description:------------------ Description The remote service encrypts traffic using TLS / SSL and... (2 Replies)
Discussion started by: manalisharmabe
2 Replies

4. Shell Programming and Scripting

Disable Tilde Expansion within Bash Scripts?

Does anyone know of a reliable method to disable tilde expansion while a script is running and then re-enable it when the script is done? I often have to work with files that have sections like this in them: 555 ~~~~~~~~~~ AN:AutoAttendant~~~~~~~~~~~~ 9195551212 ~~~~~ ... (1 Reply)
Discussion started by: jaimielives
1 Replies

5. Solaris

Printer always disable itself

Hi, I am using solaris 10, 1 of the printers encounter some issue and it is always disable itself and dont know why? any idea how to make it auto enable back to normal? is there any configuration or scripts?? kindly advise me. thanks. (2 Replies)
Discussion started by: freshmeat
2 Replies

6. Shell Programming and Scripting

How to disable Enable/Disable Tab Key

Hi All, I have bash script, so what is sintax script in bash for Enable and Disable Tab Key. Thanks for your help.:( Thanks, Rico (1 Reply)
Discussion started by: carnegiex
1 Replies

7. Solaris

How to disable SU right

Anyone know how to disable SU right for a particular user in Solaris 8 (4 Replies)
Discussion started by: civic2005
4 Replies

8. UNIX for Dummies Questions & Answers

disable su

i have this unix version "unix v/386" and i want to disable su kindly help me (2 Replies)
Discussion started by: sak900354
2 Replies

9. Shell Programming and Scripting

disable messages

hi.. I want to disable the messages that comes when USB device is inserted. I tried to do 2> /dev/null... again messages are coming to the screen.. Please help.. esham (3 Replies)
Discussion started by: esham
3 Replies

10. UNIX for Dummies Questions & Answers

Disable X

Im sure this is somthing easy to do but i just can not figure it out where and how would i take X out of the boot for hp ux 11 i looked in the man's and nothing so maybe sombody could throw me a bone... thanks BB (8 Replies)
Discussion started by: bbutler3295
8 Replies
Login or Register to Ask a Question