This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: configuring telnetd


> 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@uni-duesseldorf.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@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]