getty, login and a trivia
Root Boy Jim
rbj at dsys.ncsl.nist.gov
Thu Aug 17 08:03:31 AEST 1989
? From: Matt Goheen <matt at srs.uucp>
? 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 at srs.uucp OR matt%srs.uucp at 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.
More information about the Comp.unix.wizards
mailing list