The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Force user to change passwd on first login saurabh84g SUN Solaris 7 06-17-2009 10:05 AM
ksh script to change passwd solaix14 Shell Programming and Scripting 1 03-19-2009 07:10 PM
change passwd remotely in solaris 10 pharos467 UNIX for Advanced & Expert Users 1 09-15-2008 10:58 AM
Need to change root passwd mayewil UNIX for Dummies Questions & Answers 4 10-27-2006 06:03 PM
User should not be allowed to change passwd brookingsd UNIX for Dummies Questions & Answers 3 01-23-2006 12:00 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 2 Weeks Ago
tux0084 tux0084 is offline
Registered User
  
 

Join Date: Nov 2009
Posts: 2
Question Change /etc/passwd shell to telnet with parameters

Hello *nix users,

I'm wondering if there's a way to change a user's default shell in /etc/passwd to the telnet program along with some parameters.

For instance:
user:x:1001:1001::/home/user:/usr/bin/telnet localhost 12345

The above line in the /etc/passwd file gives the following error message:
Cannot execute /usr/bin/telnet localhost 12345: No such file or directory

Simply removing the telnet parameters fixes the error message, but I want anyone signing in as the user to A) not have a shell and B) be automatically telnet'd to localhost on port 12345.

It seemed like setting the user's shell to /usr/bin/telnet localhost 12345 should have worked, but perhaps I am missing something. This seems like an ideal solution, so fixing it is preferable, but alternate solutions are welcome as well!

Any help or suggestions are appreciated!

Thanks.
  #2 (permalink)  
Old 2 Weeks Ago
robsonde robsonde is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 162
can you give some background as to why you want this?
I feel you are going down the wrong track...

a change to the users .profile maybe a better answer.
  #3 (permalink)  
Old 2 Weeks Ago
tux0084 tux0084 is offline
Registered User
  
 

Join Date: Nov 2009
Posts: 2
The reasoning behind this is that I want to run a BBS on one of my systems. The idea is that the users will SSH into the machine and be dropped directly into the BBS login prompt (via telnet). If the user's shell is set to telnet, then if they exited the BBS, the user would not even have a regular shell.
Reply

Bookmarks

Tags
/etc/passwd, default, parameters, shell, telnet

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:59 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0