dwatts@ki.UUCP (Dan Watts) (04/23/91)
I've been trying to get /bin/login to set the environment variable REMOTEUSER from my deamon process and haven't had too much luck. My daemon works similar to telnetd/rlogind in how it invokes /bin/login. On BSD based systems, there are two undocumented switches: -h xxxx Specify remote host -p Preserve environment when invoking login session The "-h xxx" option sets the REMOTEHOST environment variable. From experimenting, it appears that the "-p" option isn't supported on SGI. I also noticed that if I invoke /bin/login with a username AND have REMOTEUSER set in the environment, then the new login session has REMOTEUSER set. I found this out by invoking /bin/login with "-p" which it interpretted as a username. Unfortunately, I don't know what the local username is going to be at the point I invoke /bin/login. One approach would be to write my own frontend to /bin/login to handle the prompting for the username and then invoke /bin/login. Perhaps someone from SGI could comment? How about it SGI? Could you change /bin/login to always use the REMOTEUSER environment variable if it's set even when a local username isn't entered on the /bin/login line? I'd even settle for a new switch (-u xxxx) to tell /bin/login. -- ################# National Nude Weekend, 13 & 14 July ################# # CompuServe: >INTERNET:uunet.UU.NET!ki.com!dwatts Dan Watts # # UUCP : ...!{uunet | wgc386}!ki.com!dwatts Ki Research, Inc. # ################ New Dimensions In Network Connectivity ###############