Some Problems

Vernon Schryver vjs at rhyolite.wpd.sgi.com
Wed Jul 4 14:19:08 AEST 1990


In article <5690>, CAVECCHIA at ITNCISCA.BITNET writes:
> I have two simple (simple?) questions:
> 
> 1) About anonymous ftp
> 
> I have configured my site with the "anonymous ftp" facility. Some of
> the directories in ~ftp are symbolic links to other directories on a
> remote disk mounted via NFS. I have discovered that if I connect as
> anonymous there is no way to do a CD to those directories (!).

Are you sure that some of the directories are NFS mounts matters?
It is true that the NFS protocol does not allow "double hops," or NFS
mounts of remote file systems that are themselves NFS mounted.  However,
that does not seem to be involved in the description above.

"Anonymous ftp" chroot(2)'s into ~ftp.  This means that all symbolic links
from within ~ftp must terminate somewhere in the ~ftp tree, or they will
appear to be dangling.  It also means that all programs in ~ftp/bin must
either not be linked with shared libraries, or their must be appropriate
shared libraries in the ~ftp tree.  Similar considerations apply to
familiar databases like /etc/passwd and /etc/group.

> Another (less complicated) question is the following:
> Is there any way to log any anonymous login (I mean user, host and what he
> downloads) to a file?

In IRIX 3.3 some limited logging can be turned on by editing
/usr/etc/inetd.conf.  See ftpd(1M).

> 2) utmp.h problems
> 
> I guessed that the struct utmp in /usr/lib/utmp.h should have the
> ut_name and ut_host fields but the second one is missing. Is there a way to
> get the user name and host of a remote user? There is another strange thing:
> when I telnet to my site from another machine the shell environment variable
> REMOTEHOST is correctly setted, but REMOTEUSER is "UNKNOWN".

The environment variables REMOTEHOST and REMOTEUSER are Silicon Graphics
features (i.e. hacks) that date from the days when we did not have fancy
BSD style /etc/*tmp files.  They are set by the appropriate deamons or
login.  The rlogin and rsh protocols includes sending the local user name
to the remote machine, and so rlogind and login can correctly set
REMOTEUSER.  The telnet protocol does not include sending the local user
name, and so telnetd on the remote machine sets REMOTEUSER to UNKNOWN.

IRIX 3.3 has /etc/*tmp files, so that who(1), w(1), last(1), etc. say more.


Vernon Schryver
vjs at sgi.com



More information about the Comp.sys.sgi mailing list