Subject: Many unanswered questions

From: "Charles L. Hutson" <[email-masked]>
Date: Tue, 28 Mar 1995 17:29:32 -0500 (EST)

I have several questions that are driving me crazy.  Here goes:

1) When I've set up an anonymous user with the following line:

ftp:*:20004:20000:Anonymous FTP Account:/opt/net/anonftp/./pub:/bin/false

I would think that when I log in, I would be automatically placed in
the "pub" directory.  Shouldn't I be able to "cd .." from here and see
everything else in my "root" directory of /opt/net/anonftp.  When I
"cd .." it keeps me in /pub.

2) I am really confused about guest users.  Being that this is one
of the 3 types of users defined in the ftpaccess file it must be 
important.  

	- Is a guest user a user that can only use ftp but can't 
	  log in?
	- How do I define a guest user in the passwd file and in
	  the ftpaccess file?
-------------------------
In an attempt to understand how to define a guest user I've done the
following:

/etc/passwd:
guest:Encryped PW HERE:20005:20000:Guest FTP Account:/opt/net/guest/./pub:/bin/false

/etc/shells:
/bin/false

/etc/group:
ftponly:*:20000:

ftpaccess:
guestgroup ftponly
------------------------
This disallows logins to guest and gives the following message in 
/var/adm/messages:

Mar 28 17:14:56 nexus ftpd[27548]: FTP LOGIN REFUSED (bad shell) FROM chaos [IP Addr here], guest

---

From: [email-masked] (Tom Lojewski)
Date: Tue, 28 Mar 1995 16:49:15 -0800 (PST)

> "cd .." it keeps me in /pub.

"ftp" is a special case.  It's going to "chroot()" to the whole path
(all the way to .../pub).  So, you shouldn't bother with the "." in
the middle of the path.  Change the directory entry to:

            /opt/net/anonftp/pub

> 	- Is a guest user a user that can only use ftp but can't 

No.  Guest users share a common "chrooted" directory.  That's the
directory entry above the ".".  In the above example they would share
"/opt/net/anonftp" but automatically cd to "/opt/net/anonftp/pub" at
login.  Experiment with this.

> 	- How do I define a guest user in the passwd file and in

Define a special /etc/group for the user.  Then list that group after
the guestgroups keyword in ftpaccess, as below.  The problem here has
to do with /bin/false, not guestgroup.

--------------------------------------------------------------------------
Tom Lojewski  -  ACUSON Corp  -  Mountain View, CA - ([email-masked])