LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 07-30-2004, 10:50 AM   #1
jedimastermopar
Member
 
Registered: Jun 2004
Distribution: fedora core 1 and core 2
Posts: 178

Rep: Reputation: 30
Create a login script?


I want to have a user setup on this bsd box I am building so that when a certain user logs in that user automacilly telnets into another server via a script. This machine is going to be replacing a Dumb terminal and I want it to look as seamless as possible.
 
Old 07-30-2004, 11:10 AM   #2
jedimastermopar
Member
 
Registered: Jun 2004
Distribution: fedora core 1 and core 2
Posts: 178

Original Poster
Rep: Reputation: 30
Ok so I think I have to edit the file .login for that user and put the commands in there, could someone post me some syntax example to open a telnet session? Also is there anything that needs to be done to tell the os to use the .login script or is just its presence enough in the users home directory?
 
Old 07-30-2004, 11:23 AM   #3
jedimastermopar
Member
 
Registered: Jun 2004
Distribution: fedora core 1 and core 2
Posts: 178

Original Poster
Rep: Reputation: 30
Ok so I think I have to edit the file .login for that user and put the commands in there, could someone post me some syntax example to open a telnet session? Also is there anything that needs to be done to tell the os to use the .login script or is just its presence enough in the users home directory?
 
Old 07-30-2004, 11:49 AM   #4
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Well, you are going to want to set the user's shell to tcsh (that way you know it will be run). And it won't be seamless... they will be prompted for a password twice.
 
Old 08-02-2004, 08:07 AM   #5
january
LQ Newbie
 
Registered: Aug 2004
Posts: 14

Rep: Reputation: 0
Maybe you could use perl in the login script to activate a telnet or access DB before telnet. like...........
system "telnet -E 192.9.1.254";
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check in a script whether the shell is login or non login? frankie_DJ Programming 7 10-21-2015 10:09 AM
can't login after create user lapn99 Linux - General 6 05-11-2013 03:39 AM
how do i create a script unimaginative Linux - General 6 01-01-2004 06:53 PM
How to create many by a script kelper Linux - General 11 09-24-2003 03:09 PM
How do I create a script? ACURA TL-S Linux - Newbie 1 08-03-2003 09:58 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

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