niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » BSD » OpenBSD
Restricted shell
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
Author Message
Falk Husemann
*nix forums beginner


Joined: 22 Mar 2006
Posts: 2

PostPosted: Wed Mar 22, 2006 3:53 pm    Post subject: Re: Restricted shell Reply with quote

Lars Bonnesen schrieb:

Hi Lars!

Quote:
What is the way to have a user with shell login restircted to only one
directory - not being able to move around?

I've had to built the same for server of us. I used rksh as you did,
created a seperate directory full of apps the users are to use and set
PATH to that directory exclusively. I provides the flexibility to choose
which versions, gnu or not etc.

As Rodrick said. If "they" have a compiler or interpreter at hand there
is the possibility of the lusers doing "things".



Greets,
Falk
Back to top
igor@nospam.invalid
*nix forums addict


Joined: 17 Aug 2005
Posts: 81

PostPosted: Sat Dec 03, 2005 12:48 am    Post subject: Re: Restricted shell Reply with quote

Lars Bonnesen <none@invalid> wrote:
Quote:

What is the way to have a user with shell login restircted to only one
directory - not being able to move around?

As a restricted shell does not allow a user to change the SHELL, ENV,
and PATH environment variables, nor calling commands using absolute
or relative paths, you must be sure he has a PATH environment variable
to a ~/bin directory that has only the commands he is allowed to run.

Be careful choosing the commands he is allowed to use (e.g., vi(1)
allows any user to run an unrestricted shell by typing, we say,
:!/bin/sh, as it does not has the same restrictions as an r*sh).

Cheers,
Igor.
Back to top
rodrick.brown@gmail.com
*nix forums beginner


Joined: 01 Nov 2005
Posts: 37

PostPosted: Tue Nov 08, 2005 6:40 pm    Post subject: Re: Restricted shell Reply with quote

"Lars Bonnesen" <none@invalid> wrote in message
news:436ccd87$0$8867$edfadb0f@dread14.news.tele.dk...
Quote:
Got a user that are going to have SSH access to one of my OpenBSD boxed.

I want to have him restricted so that he cannot move around on the system,
but for what I have found out, chroot like in FTP is a strange thing when
talking SSH (or telnet for that matter).

So I have played around a but with rksh. I edited his default shell with
vipw to be rksh - and it works. Well, there are to things that makes it
not working:

1) he can change shell by himself to say csh, and then he can move around
on my OBSD box.
2) in rksh, he can start Midnight Commander and browse allmost the whole
system.

What is the way to have a user with shell login restircted to only one
directory - not being able to move around?

Regards, Lars.


If you dont trust this user dont give him a shell, its as simple as that, if
your system is configured correctly permissions and file access permissions
you should not have to worry about this user getting into areas (s)he
shouldnt, restricted shells are a joke especially when you have compilers,
and proigramming interperters around perl, ruby php etc.. that can easily
for a shell.


--
Rodrick R. Brown
Senior IT Consultant
http://www.rodrickbrown.com
rodrick.brown[<@>]gmail.com

When in 1986 Apple bought a Cray X-MP and announced that they would use it
to design the next Apple Macintosh, Seymour Cray replied, "This is very
interesting because I am using an Apple Macintosh to design the Cray-2
supercomputer."
Back to top
Lars Bonnesen
*nix forums beginner


Joined: 22 Sep 2005
Posts: 22

PostPosted: Sat Nov 05, 2005 3:19 pm    Post subject: Restricted shell Reply with quote

Got a user that are going to have SSH access to one of my OpenBSD boxed.

I want to have him restricted so that he cannot move around on the system,
but for what I have found out, chroot like in FTP is a strange thing when
talking SSH (or telnet for that matter).

So I have played around a but with rksh. I edited his default shell with
vipw to be rksh - and it works. Well, there are to things that makes it not
working:

1) he can change shell by himself to say csh, and then he can move around on
my OBSD box.
2) in rksh, he can start Midnight Commander and browse allmost the whole
system.

What is the way to have a user with shell login restircted to only one
directory - not being able to move around?

Regards, Lars.
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 8:05 am | All times are GMT
navigation Forum index » *nix » BSD » OpenBSD
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts restricted environment Gabriele *darkbard* Farin python 7 Wed Jul 19, 2006 11:06 pm
No new posts rc.d shell script Kaitlyn Luna FreeBSD 7 Wed Jul 19, 2006 5:29 am
No new posts how to use Env variables & its path in ksh shell script dalu.gelu@gmail.com shell 8 Tue Jul 18, 2006 1:12 pm
No new posts sleep interrupts in Bourne vs. Korn shell Andy Haupt shell 2 Mon Jul 17, 2006 10:23 pm
No new posts execute a shell script from a python script spec python 7 Mon Jul 17, 2006 8:11 pm

Myspace Backgrounds | Remortgages | Loans | Tesco | Myspace Layouts
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2354s ][ Queries: 20 (0.1279s) ][ GZIP on - Debug on ]