LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-19-2009, 01:13 AM   #1
sunlinux
Member
 
Registered: Feb 2006
Distribution: RHCL 5
Posts: 229

Rep: Reputation: 30
limited access user


hi,

I want to create a user who has very limited accessibility on commands, like he can only use cp and mv command no others .. is it possible ?
 
Old 05-19-2009, 01:42 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
Can you clarify what your actual motivations are here? any user can only affect their own files and such, so whatever they can do they can only do to themselves. If you mean with regards to doing cp on system wide commands, then you can use the sudo framework to allow certain users to do very specific things as root and nothing else.
 
Old 05-19-2009, 03:14 PM   #3
Quigi
Member
 
Registered: Mar 2003
Location: Cambridge, MA, USA
Distribution: Ubuntu (Dapper and Heron)
Posts: 377

Rep: Reputation: 31
I agree with Chris, please clarify why that would be desirable!

Yes, it's possible. Instead of bash, give that user a "shell" that only understands "mv" and "cp" (note that they won't be able to log off). You could write that as a perl script. Yes, I've done it and it works; my script understood only "exit".

Beware that the user could effectively remove files even if you don't allow "rm". E.g.:
Code:
mv file-a /tmp/.gone
mv file-b /tmp/.gone
cp /dev/null /tmp/.gone
/Quigi
 
Old 06-15-2009, 01:26 PM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Well? . . .
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
create very limited linux user, only give access to rdesktop treyhphp Linux - Newbie 14 02-18-2009 03:19 PM
limited directory access ufmale Linux - Software 1 04-14-2007 09:48 AM
Limited User Access Jakeh2k1 Red Hat 1 06-07-2005 08:03 AM
ssh limited access macadam Linux - Newbie 7 12-23-2003 02:06 PM
reboot so user can access fs space limited by group recently added to? bdp Linux - General 4 09-27-2003 02:21 AM


All times are GMT -5. The time now is 05:00 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration