LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-06-2008, 09:20 PM   #1
aznium
Member
 
Registered: Jun 2005
Posts: 36

Rep: Reputation: 15
Linux Limit User


Is it possible to limit a user to not be able to run any executables?

ie. user account 'guest'

guest can read/write/add new files in /home/guest

however, guest may not execute any programs.
 
Old 12-06-2008, 10:11 PM   #2
nflenz
Member
 
Registered: Feb 2006
Distribution: CRUX 2.4
Posts: 96

Rep: Reputation: 18
What could that account possibly be used for then?
 
Old 12-06-2008, 10:15 PM   #3
nflenz
Member
 
Registered: Feb 2006
Distribution: CRUX 2.4
Posts: 96

Rep: Reputation: 18
I should be clearer. The software used to "read/write/add new files" are executables, so disabling the users ability to run executables would also disable their ability to do anything with files.
 
Old 12-07-2008, 01:18 AM   #4
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
You could give them a custom shell (that is... program your own).. that would theoretically take away their ability and probably the best option.

You could also do something stupid like 'chown root:users' to all the files /bin/ /usr/bin and then 'chmod 754' to all regular files... anybody not in the users group would be excluded from executing the files.


I'm sure somebody has already made a specialized shell with stripped down abilities.
 
Old 12-07-2008, 01:35 AM   #5
aznium
Member
 
Registered: Jun 2005
Posts: 36

Original Poster
Rep: Reputation: 15
the usage is to allow them to SSH files in and out
 
Old 12-08-2008, 10:49 AM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Look here
 
Old 12-09-2008, 11:03 AM   #7
nflenz
Member
 
Registered: Feb 2006
Distribution: CRUX 2.4
Posts: 96

Rep: Reputation: 18
Why not just set up an ftp server?
 
Old 12-09-2008, 11:52 AM   #8
aznium
Member
 
Registered: Jun 2005
Posts: 36

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by nflenz View Post
Why not just set up an ftp server?
ftp is not encrypted.


thanks tinkster, on 2nd thought - i would like to let the user have access to simple commands such as bzip2, dir, cp...but the motivation for it is to limit the user from being able to upload their own executable and run it...i guess this is pretty hard to do?

thanks
 
Old 12-09-2008, 11:57 AM   #9
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by aznium View Post
the usage is to allow them to SSH files in and out
Then why not use rsync?
 
Old 12-09-2008, 12:57 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by aznium View Post
ftp is not encrypted.


thanks tinkster, on 2nd thought - i would like to let the user have access to simple commands such as bzip2, dir, cp...but the motivation for it is to limit the user from being able to upload their own executable and run it...i guess this is pretty hard to do?

thanks
No, that can be done with a forced command, too.
Just present them with a menu written in shell
that lets them choose from a set of given actions,
and that will not let them do anything from which
they can shell out (e.g. emacs, vim), and maybe
a second login that only permits the scp/sftp.
You'd have to do it that way because forced
commands and scp/sftp are mutually exclusive.

ssh FAQ

Last edited by Tinkster; 12-09-2008 at 12:59 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to limit ssh by user and ip cizzi Linux - Security 6 02-15-2008 03:18 PM
ip limit for a user in any process ysar68 Linux - Security 3 05-10-2007 08:56 AM
limit processes for each user jackripper2988 Slackware 1 03-17-2006 01:32 AM
user limit problems paulmer2003 Linux - Software 0 02-14-2005 08:04 PM
User quota limit ust Linux - General 1 12-16-2004 06:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:32 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