Xetroximyn
asked on
Mac telnet client seems to skip part of login script?
I have no idea how but it seems like a mac telnet client is skipping part of our login script. We use tcsh and at the bottom of .login I have a section that executes and asks some questions and drops a person in some software instead of a command prompt. But I see the person at the command prompt instead.
Any ideas?
Any ideas?
Sounds like something in the environment exported by the Mac. Would need to see your .login to say any more.
ASKER
Here is the most relevant section that seems to be skipped
if ($USER == "client") then
fixsuper
fixsuper
fixsuper
cd /usr/cfmc/jobs
clear
tryagain:
set jobfolder = ""
echo " "
echo " "
echo " Please enter the JOB FOLDER from the instructions"
echo " "
echo " or type 'abort' to logout"
echo " "
echo -n " --> "
set jobfolder = `head -1`
if ( `echo ${jobfolder} | grep -c "abort"` ) then
logout
endif
if ( ${jobfolder} == "" ) then
clear
goto tryagain
endif
set studycode = ""
echo " "
echo " "
echo " Please enter the STUDY CODE from the instructions"
echo " "
echo " or type 'abort' to logout"
echo " "
echo -n " --> "
set studycode = `head -1`
if ( `echo ${studycode} | grep -c "abort"` ) then
logout
endif
if ( ${studycode} == "" ) then
clear
goto tryagain
endif
if ( { ls /usr/cfmc/jobs/${jobfolder} } == "1" ) then
clear
cd ${jobfolder}
if ( { ls /usr/cfmc/jobs/${jobfolder}/test } == "1" ) then
clear
cd test
survent "init:${studycode};dbug;yes"
else
clear
netsurv "init:${studycode};dbug;yes"
endif
else
clear
echo " "
echo " It appears that job does not exist on the system"
echo " "
echo " Check the instructions and try again"
echo " "
echo " If you continue to have issues let us know"
echo " "
echo " "
goto tryagain
endif
echo " "
echo " "
echo " press enter to logout"
echo " "
set logout = `head -1`
logout
endif
shouldn't that be
if [ $USER == "client" ] ; then
if [ $USER == "client" ] ; then
ASKER
This is actually csh/tcsh which has different IF syntax than bash. Also this code works fine when people telnet from windows... but not mac.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks! Iam trying to get the mac user to list their env so I can check
You could put a line at the head of .login such as env>/tmp/$PPID.env - that will tell you all you need to know. (The process ID will be that of the in.telnetd invocation)
ASKER
hmmm... seems it does not work. If I login, no file is made. If i do
source .login
in an existing window a file is made... any ideas?
source .login
in an existing window a file is made... any ideas?
Not executing .login may be your problem. man tcsh tells me that it ought to be executed, at least if your login shell (in /etc/passwd) is /bin/tcsh or /bin/csh. Users may change their login shells using chsh - you might want to check that they haven't done that.
env>/tmp/$PPID.env is bash syntax - maybe you need to adjust for tcsh? But you did say it worked when you sourced it.
env>/tmp/$PPID.env is bash syntax - maybe you need to adjust for tcsh? But you did say it worked when you sourced it.
ASKER
dur... So there are a number of users that share a login script... I forgot I recently separated my user from that, so I was not using the login script... it is in fact working. Now I just need to get a mac user to login... (they are so rare.... most of our clients use windows)