LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-09-2002, 12:22 AM   #1
jonfa
Member
 
Registered: Mar 2001
Location: FL
Posts: 257

Rep: Reputation: 30
telnet question


Hi All,

Is it possible to allow a user to telnet in, but that user is trapped in a directory? I want a user to be able to execute a program from the command prompt, but only be able to do that one task and nothing else. Thanks.

Jon
 
Old 04-09-2002, 01:06 AM   #2
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
I think I have one. A friend of mine has this on his machine. Create a user name, whatever, music, and then in /etc/passwd change the typical:

bob:x:1001:100:J.R. "Bob" Dobbs,13013,,:/home/bob:/bin/bash

To something like:

music:x:1002:100:Put Another Nickel In,,,:/home/music:/usr/local/bin/mp3blaster

In this case there is no password in /etc/shadow for the user music, but there easily could be one. When someone logs in as music, instead of exec'ing bash, it executes mp3blaster.

Cheers,

Finegan
 
Old 04-09-2002, 05:57 AM   #3
jonfa
Member
 
Registered: Mar 2001
Location: FL
Posts: 257

Original Poster
Rep: Reputation: 30
That worked perfect. Thank you!
 
Old 04-09-2002, 02:07 PM   #4
jatimon
Member
 
Registered: Apr 2002
Posts: 33

Rep: Reputation: 15
chroot

while that works for one single command, what about when you want him to have access to two commands?

I suggest making him chrooted and only putting the commands you want him to be able to execute in his /bin directory.

great instructions on chroot at www.linuxdoc.org
 
  


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
a telnet question... Adairen Linux - Newbie 3 08-27-2003 01:30 PM
Stupid Telnet Question soundphan Linux - Newbie 4 07-19-2003 10:55 AM
telnet question gojoe Linux - Networking 4 05-22-2003 12:58 AM
Stupid telnet question KevStA Linux - Newbie 9 06-13-2002 06:31 PM
Telnet Question jayakrishnan Linux - General 2 03-30-2002 11:59 AM

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

All times are GMT -5. The time now is 01:59 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
Open Source Consulting | Domain Registration