Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!wuarchive!uwm.edu!rutgers!otello!gear!am!alex From: alex@am.sublink.org (Alex Martelli) Newsgroups: comp.unix.admin Subject: Re: Forcing actions at login Message-ID: <1991Jan10.191546.268@am.sublink.org> Date: 10 Jan 91 19:15:46 GMT References: <6153@ecs.soton.ac.uk> <446@minya.UUCP> Organization: Premiata Famiglia Martelli & Figli Lines: 42 jc@minya.UUCP (John Chambers) writes: [discussion of using a script as shell for a pseudo-user] :It turns out to be a bad idea to use /bin/sh as the login shell for :such a script. Why? Well, /bin/sh insists on running /etc/profile :for all users; there's no (documented ;-) way to suppress this. If :your /etc/profile does "cat /etc/motd" (and most do), it is just a Just kludge up a way to disable motd-checking - simplest scheme I can think of, offhand, is to add something like: egrep "^$LOGNAME:.*NOMOTD" /etc/passwd >/dev/null && exit just before the cat /etc/motd in /etc/profile, then add the NOMOTD keyword somewhere in the /etc/passwd line of the pseudo-user (e.g. in the gcos field, or just use it as a part of the filename of the pseudo shell script for the pseudo-user). :One nice thing about csh is that it doesn't have such a mandatory :global startup file. It only runs $HOME/.login and/or $HOME/.cshrc; Fancy that, I'd count this as one NASTY thing about csh!-) :On the other hand, just a few weeks ago, I ran across a sytem with :a very clever getty that dumps /etc/motd to the port itself. The One day I'll tell you about the getty which catted /etc/issue, which contained something about "AT&T" which the somewhat-Hayes-compatible modem took as a request to ENTER SELF-TEST-MODE... :Why is it that, as commercial Unix systems get more and more "user :friendly", they get harder and harder to keep working right. Maybe :we should start hollering about "admin friendly" features. On this general subject, I can agree wholeheartedly. I particularly detest such useless feechures as automatical sourcing of .logout on shell termination, when trapping on a 0 signal (to . .logout, or to whatever one wants) is so clearly right! They pander to semieducated users, and semieducated system administrators, and meanwhile make it all more complex for all of us. -- Alex Martelli - (home snailmail:) v. Barontini 27, 40138 Bologna, ITALIA Email: (work:) staff@cadlab.sublink.org, (home:) alex@am.sublink.org Phone: (work:) ++39 (51) 371099, (home:) ++39 (51) 250434; Fax: ++39 (51) 366964 (work only), Fidonet: 332/401.3 (home only).