Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!aplcen!haven!adm!xadmx!rbj@dsys.ncsl.nist.gov From: rbj@dsys.ncsl.nist.gov (Root Boy Jim) Newsgroups: comp.unix.wizards Subject: getty, login and a trivia Message-ID: <20632@adm.BRL.MIL> Date: 16 Aug 89 22:03:31 GMT Sender: news@adm.BRL.MIL Lines: 47 ? From: Matt Goheen? While snooping around, I found a couple of interresting things about ? login and getty that (at least) I didn't know. In getty, there is ? a string "Amnesiac" -- anyone know what that's for? main(argc, argv) /*getty*/ char *argv[]; { .... gethostname(hostname, sizeof(hostname)); if (hostname[0] == '\0') strcpy(hostname, "Amnesiac"); ... } ? In login, there ? are a couple of apparent undocumented options, "-h" and "-r". I ? can't seem to get "-h" to do anything, but a "/bin/login -r" does ? some strange things (no prompts, and an error message that reads ? "remuser too long" after about 8 characters on stdin). ... /* * login [ name ] * login -r hostname (for rlogind) * login -h hostname (for telnetd, etc.) */ ... /* * -p is used by getty to tell login not to destroy the environment * -r is used by rlogind to cause the autologin protocol; * -h is used by other servers to pass the name of the * remote host to login so that it may be placed in utmp and wtmp */ ? - uucp: {rutgers,ames}!rochester!srs!matt Matt Goheen ? - internet: matt@srs.uucp OR matt%srs.uucp@harvard.harvard.edu - ? - "We had some good machines, but they don't work no more." - ? BTW, this is on a Sun running 3.2 (and 3.4), and I have NO UNIX ? SOURCE LICENSE.. Too bad. Root Boy Jim Have GNU, Will Travel.