JoeJaz has asked for the wisdom of the Perl Monks concerning the following question:
My problem is that for testuser1 and testuser3, I was not able to log in while, testuser2 logs in beautifully. I have isolated the problem and have determined that it lies in each user's .bashrc file, in particular, the PS1 line in the file.#!/usr/bin/perl -w use strict; my $hostname="localhost"; my $port=23; #my $username="testuser1"; #my $password="1helpnow"; #my $username="testuser2"; #my $password="1please"; my $username="testuser3"; my $password="1password"; use Net::Telnet(); my $t = new Net::Telnet (Timeout=>10, Prompt=> '/[\$%#>\d\w\r] $/'); $t->dump_log("log.telnet.dat"); $t->open(Host => $hostname, Port => $port); $t->login($username, $password); my @lines = $t->cmd("who"); $t->lastline; $t->close; print "@lines\n";
RED="\[\033[1;31m\]" # Color Definitions for bash LIGHT_RED="\[\033[1;31m\]" BLUE="\[\033[1;34m\]" WHITE="\[\033[1;37m\]" NC="\[\033[0;0m\]" # No Color PS1="${TITLEBAR}\ $BLUE[$RED\$(date +%I:%M)$BLUE]\ $BLUE[$LIGHT_RED\u@\h:\w$BLUE]$WHITE#$NC "
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::Telnet stalls
by JamesNC (Chaplain) on Jun 18, 2003 at 22:03 UTC | |
by JoeJaz (Monk) on Jun 19, 2003 at 14:47 UTC | |
|
Re: Net::Telnet stalls
by sgifford (Prior) on Jun 19, 2003 at 01:32 UTC | |
by jcpunk (Friar) on Jun 19, 2003 at 14:37 UTC | |
by JoeJaz (Monk) on Jun 19, 2003 at 14:54 UTC | |
|
Re: Net::Telnet stalls
by MZSanford (Curate) on Jun 18, 2003 at 20:02 UTC | |
by JoeJaz (Monk) on Jun 18, 2003 at 20:08 UTC |