delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/09/09/22:24:18

From: tolj AT uni-duesseldorf DOT de (Stipe Tolj)
Subject: Re: configuring telnetd
9 Sep 1998 22:24:18 -0700 :
Message-ID: <35F5B3D6.713232C4.cygnus.gnu-win32@uni-duesseldorf.de>
References: <Pine DOT SUN DOT 3 DOT 96 DOT 980907121307 DOT 4027A-100000 AT ee>
Mime-Version: 1.0
To: Leonid Rokhinson <leonid AT EE DOT Princeton DOT edu>
Cc: gnu-win32 AT cygnus DOT com

> I have a few minor problems with telnetd: first, it does not echo the
> commands on my SUN telnet. Second, how I can set bash properly, so it
> would read .bashrc from the home directory (my passwd file has the
> following line:

I'm using B19.2 & remote on a P166 Windows98 box.I don't have any problems in
telneting from several Sun Server1000 and Ultra 2 machines. Is telnetd
echoing on the Windows own telnet client?!

I had the same problem about bash to read the user specific .bashrc file. You
can't add any options to the passwd entry. So what I did was to patch the
login.c file a bit. One on the diffs is this one (this ain't the most elegant
way):

[...]
 (void)signal(SIGALRM, SIG_DFL);
 (void)signal(SIGQUIT, SIG_DFL);
 (void)signal(SIGINT, SIG_DFL);
 (void)signal(SIGTSTP, SIG_IGN);

 tbuf[0] = '-';
 tbuf[1] = 'i';
#ifndef __CYGWIN32__
 strcpy(tbuf + 1, (p = rindex(pwd->pw_shell, '/')) ?
     p + 1 : pwd->pw_shell);
 sexeclp(hToken,pwd->pw_shell, tbuf, 0);
#else
        execl(pwd->pw_shell, NULL);
#endif
 fprintf(stderr, "login: no shell: ");
 perror(pwd->pw_shell);
 exit(0);
[...]

So actualy I'm adding the -i option (inderactive ~/.bashrc reading from
specific login user)  to the exec call. This works. If there is anyone out
there having a more elegant way for Win95 and Win98 let me know. A remote FAQ
should be started anyway, since there are a lot of posting concerning the
remote package of Sergey.

> leonid::1000:513:Leonid Rokhinson://c/usr/leonid:/bin/bash

I recommend to change the //c/... entry to UNIX style, i.e. mount drive C: to
root / and use /usr/leonid.

Regards, Stipe.

--
Stipe Tolj <tolj AT uni-duesseldorf DOT de>
Cygwin32 Porting Project
Department of Economical Computer Science
University of Cologne, Germany
http://www-public.rz.uni-duesseldorf.de/~tolj




-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019