prevent user from excute command


 
Thread Tools Search this Thread
Special Forums Cybersecurity prevent user from excute command
# 1  
Old 06-02-2009
prevent user from excute command

Dears
I want to prevent users from doing spesific command "history -c" or "history" in general
How can I do ?
# 2  
Old 06-02-2009
For such a specific feature, you can set the HISTSIZE variable to 0 and the mark it read-only. Do this in the global initialization (rc) file.

Code:
export HISTSIZE=0
declare -r HISTSIZE

Note, a clever user can still get around this.
# 3  
Old 06-03-2009
THis's v good, But what if I want to just prevent users from usind -c with there history command ??
# 4  
Old 06-10-2009
As far as I know there is no way of preventing a user from deleting their history in bash.
# 5  
Old 06-23-2009
Okay, you can re-compile bash or what have you and disable the history command. You "simply" search the source for the word "history" until you find a C-string, go into this file, and basically, remove the string or line(s) of code which links the keyword to a function. Then recompile and re-install.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Prevent user from creating new user from his login

Hi Experts, Need your support Redhat 6.5 I want to create a user with all(read, write, execute) privileges except that user should not be able to create any new user from his login to perform any task. (10 Replies)
Discussion started by: as7951
10 Replies

2. AIX

Prevent admin user accidentally remove database files.

Hi Folks, Any system admin did provide AIX file system control to prevent user/ admin accidentally remove database files ? Thanks. (4 Replies)
Discussion started by: ckwan
4 Replies

3. Shell Programming and Scripting

Prevent the user from changing his directory

Hi could some let me know how to prevent user from changing his home directory....... Thanks in advance.... (6 Replies)
Discussion started by: rahul547
6 Replies

4. Shell Programming and Scripting

Prevent the user from changing his directory

Hi could some let me know how to prevent user from changing his home directory....... Thanks in advance.... (1 Reply)
Discussion started by: Revanth547
1 Replies

5. Shell Programming and Scripting

Login, excute command, logout Script Help

Good Evening all, After spending the last week or so reading many posts I decided to register and join in. This is my first post on the forum so please forgive me as im new to this, Im after some help in throwing together a quick basic script without using expect to change the password on several... (4 Replies)
Discussion started by: mutley2202
4 Replies

6. UNIX Desktop Questions & Answers

ssh command doesnot excute commands in the destination server

Hi All, I have the below code where Iam connecting from xzur111pap server to xzur0211pap server thru ssh to execute some commands. ssh xzur0211pap spaceleft=`df -k /home |tail -1 | awk '{print $5}'` spaceleft=${spaceleft%\%} if ]; then echo "ALERT : HUFS(/home $spaceleft)" exit 0... (3 Replies)
Discussion started by: gaddamja
3 Replies

7. IP Networking

how to prevent a user from downloading on lan

hi all, i want to prevent users downloading files in the office as bandwidth becomes very low and affects work. one of my friend tried to close the connection using ethercap but this does not work. i have a debian desktop while other users use MS W!ndows. Please provide any help. Thanks (5 Replies)
Discussion started by: coolatt
5 Replies

8. UNIX for Dummies Questions & Answers

Force user to use ssh/prevent telnet access

I have just set up a user on our system HP-Thru64. The user needs to be able to su to root after they login and this works fine. Users cannot login from root externally so you have to first connect as a user and then su. I am wondering is it possible for me to prevent the user from having telnet... (4 Replies)
Discussion started by: peragin
4 Replies

9. UNIX for Advanced & Expert Users

How to prevent local root from su to an NIS user?

We have a shared development box, running Solaris 10 that is an NIS client, all the developers have local root password. If they know the NIS uid of another user, they can just do % useradd -u <uid> login And then log in as that user and have full access to his files in his home directory. ... (3 Replies)
Discussion started by: nfw
3 Replies

10. UNIX for Dummies Questions & Answers

Can I prevent a user from changing the permissions on their home directory.

Hello All, I have a new HPUX system going into production and it will be used by 2 projects. One of the contract requirements is the 2 groups can not have access to the others work or data. I believe I have the system pretty well locked up using groups and permissions and selective mounting of... (2 Replies)
Discussion started by: DanL
2 Replies
Login or Register to Ask a Question