LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-24-2011, 10:50 AM   #1
ramesh14
Member
 
Registered: Apr 2008
Location: Hyderabad
Distribution: RHEL5,Fedora 8/9
Posts: 119
Blog Entries: 1

Rep: Reputation: 15
remove some commands a user


i am using cent os Mechlin
i created a user tester
i need to restrict mysqldump mysql ftp rsync ping cp mv rm command for tester user
i flowed thees steps
su - tester
mkdir programs
cp /bin/* programs/
rm programs/mysqldump mysql ftp rsync ping cp mv rm
vi .bash_profile
PATH=$PATH:$HOME/
export $PATH
./bash_profile

but tester can access mysqldump mysql ftp rsync ping cp mv rm
please guide me how can remove thees command for tester user


please guide me...
thank in advance
 
Old 03-24-2011, 11:18 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Hm, the way you're doing it won't work if the person is actually going to try to access the programmes (they can just change $PATH again), but if what you're doing is only for testing purposes then change the line in .bash_profile to:
Code:
PATH=$HOME/programs
export $PATH
That should mean they can only access programmes in /home/tester/programs
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to edit history to remove few commands executed g_ramesh Linux - Newbie 14 06-03-2015 02:42 AM
How do i remove commands. pinga123 Linux - Newbie 15 10-06-2010 01:28 AM
Commands to remove particular few lines in the history file cartti Linux - Newbie 1 06-16-2010 12:57 PM
user commands mona-lolly Linux - Newbie 2 01-07-2010 11:03 AM
Running super user commands as normal user mickyg Linux - Security 5 10-14-2005 07:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration