The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > Security
.
google unix.com



Security Discuss UNIX and Linux computer and network security, cybersecurity, cyberattacks, IT security, CISSP, OWASP and more.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to prevent grep command from throwing a system trap if No match is found. cool.aquarian UNIX for Advanced & Expert Users 2 01-08-2009 01:42 PM
Excute file then.. omgsomuchppl Shell Programming and Scripting 3 12-09-2008 07:09 PM
How to prevent local root from su to an NIS user? nfw UNIX for Advanced & Expert Users 3 01-08-2008 01:38 PM
Can I prevent a user from changing the permissions on their home directory. DanL UNIX for Dummies Questions & Answers 2 08-29-2006 12:56 PM
help! can't excute hassan2 UNIX for Advanced & Expert Users 6 09-10-2002 02:30 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-02-2009
reaky reaky is offline
Registered User
  
 

Join Date: May 2009
Posts: 15
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 (permalink)  
Old 06-02-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,884
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 (permalink)  
Old 06-03-2009
reaky reaky is offline
Registered User
  
 

Join Date: May 2009
Posts: 15
THis's v good, But what if I want to just prevent users from usind -c with there history command ??
  #4 (permalink)  
Old 06-10-2009
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2003
Location: Florida
Posts: 1,912
As far as I know there is no way of preventing a user from deleting their history in bash.
  #5 (permalink)  
Old 06-23-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,884
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.
Sponsored Links
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:36 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0