Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - /etc/motd issues ..: (4 Items)
   
/etc/motd issues ..  
Hi,

we've noticed that the /etc/motd is only displayed sproadically when logging in via telnet. I've tested this on a full 
QNX 6.4.0 2008/09/02 install in a VM, and on our mpc8313 target.

After creating the /etc/motd (world readable) and logging in via telnet, the message is sometimes displayed, but in most
 cases it is not.

As a side note, also /etc/issue.net is not displayed when logging in via telnet (tested on x86 in VM).

Any ideas?

Greetings,
 Marc
Re: /etc/motd issues ..  
On Mon, Mar 23, 2009 at 09:43:37AM -0400, Marc Roessler wrote:
> Hi,
> 
> we've noticed that the /etc/motd is only displayed sproadically when logging in via telnet. I've tested this on a full
 QNX 6.4.0 2008/09/02 install in a VM, and on our mpc8313 target.
> 
> After creating the /etc/motd (world readable) and logging in via telnet, the message is sometimes displayed, but in 
most cases it is not.

/etc/motd appears to be handled by this section of /etc/profile.  sshd
appears to always spit it out.


if test -f ~/.hushlogin -o "$TTY" = "not a tty"; then
 	echo -n >~/.lastlogin
else
 	echo "${DATE=$(date +%c)} on ${TTY}"
 	test /etc/motd -nt ~/.lastlogin && cat /etc/motd
 	test -s ~/.lastlogin && echo $(<~/.lastlogin)
 	echo "Last login: ${DATE} on ${TTY}" >~/.lastlogin
 	unset DATE
fi

> 
> As a side note, also /etc/issue.net is not displayed when logging in via telnet (tested on x86 in VM).

I can't find any reference to /etc/issue.net.

-seanb
Re: /etc/motd issues ..  
Thanks Sean, found the issue with the motd... removed the lastlogin check, works now. I was a bit confused since this 
doesn't seem to be standard Unix behavior to output motd only _once_ for each user.

Regarding the issue with /etc/issue (pun intended), I'd expect this to be printed before logging in. It is usually done 
by either the getty or telnetd or sshd...
So i suppose this means that qnx telnetd doesn't support it...

Greetings,
 Marc
Re: /etc/motd issues ..  
On Mon, Mar 23, 2009 at 11:44:48AM -0400, Marc Roessler wrote:
> Thanks Sean, found the issue with the motd... removed the lastlogin check, works now. I was a bit confused since this 
doesn't seem to be standard Unix behavior to output motd only _once_ for each user.

Yes, it does seem a bit strange.  I'll make a PR.

> 
> Regarding the issue with /etc/issue (pun intended), I'd expect this to be printed before logging in. It is usually 
done by either the getty or telnetd or sshd...
> So i suppose this means that qnx telnetd doesn't support it...

Not telnetd currently.  It looks like you may be able to do something
similar with the 'Banner' option to /etc/ssh/sshd_config

> 
> Greetings,
>  Marc
> 
> _______________________________________________
> OSTech
> http://community.qnx.com/sf/go/post25025
>