Operating System - HP-UX
1838880 Members
3316 Online
110130 Solutions
New Discussion

Re: ftpaccess file problem.

 
SOLVED
Go to solution
RAC_1
Honored Contributor

ftpaccess file problem.

HP-UX 11.11.

My ftpaccess file looks like this.

class local real,anonymous,guest *
class remote anonymous *
banner /etc/issue

File /etc/shells is OK and lists all valid shells. ftp line in inetd.conf is as follow.
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -la /etc/ftpd/ftpaccess

I do inetd -c and try to do ftp but get following error.

ACCESS DENIED (not in any class) TO xxxx [xxx.xx.xx.xxx]
FTP LOGIN REFUSED (access denied) FROM xxxx [xxx.xx.xx.xxx], user_name.

Thanks in Advance.
There is no substitute to HARDWORK
15 REPLIES 15
Paul Sperry
Honored Contributor

Re: ftpaccess file problem.

You need the shell of the user that is trying to ftp in the /etc/shells file. e.g If root is set up like this in /etc/passwd :
root:xxxxxxxxxx:0:3::/:/sbin/mysh
then you need /sbin/mysh in /etc/shells
Sridhar Bhaskarla
Honored Contributor

Re: ftpaccess file problem.

Hi,

Is there a space between guest and *?. It should be looking like

class local real, anonymous,guest *

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: ftpaccess file problem.

Oops.. I meant there should be a space between guest and *.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Elena Leontieva
Esteemed Contributor

Re: ftpaccess file problem.

Please, check /var/adm/inetd.sec file
Paul Sperry
Honored Contributor

Re: ftpaccess file problem.

Also check /var/adm/inetd.sec
RAC_1
Honored Contributor

Re: ftpaccess file problem.

For Shripdhar.

There is a space between guest and *.

For Paul and Elana.

There are no restrictions in inetd.sec.

Shell is listed in /etc/shells.

I am getting this error for all users.
There is no substitute to HARDWORK
Paul Sperry
Honored Contributor

Re: ftpaccess file problem.

since it complains about "not in any class", try to include the user in the class in /etc/ftpd/ftpacces, i.e. change the following line:

class local real,anonymous,guest *
to
class local real,guest,anonymous,user *

then try to ftp as user
just something to try
Bill Douglass
Esteemed Contributor

Re: ftpaccess file problem.

The second class entry is not used, since user anonymous is already defined in class local.

Try replacing the * with a subnet address that you are logging in from.
Sridhar Bhaskarla
Honored Contributor

Re: ftpaccess file problem.

Hi Anil,

You got me in there. Is this happening for only user_name or all the users?.

I cut and pasted your three lines on my workstation. It works just fine.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Paul Sperry
Honored Contributor

Re: ftpaccess file problem.

or try

class all real,guest,anonymous *


RAC_1
Honored Contributor

Re: ftpaccess file problem.

Paul,

Adding user name worked.

Do not know how to define class statement. In order to grant all users(user logins) ftp access, Will I have to add each user in class statement? or can i put as follows.

class local guest,anonymous,guest,* *

Thanks for the help.
There is no substitute to HARDWORK
Paul Sperry
Honored Contributor
Solution

Re: ftpaccess file problem.

Try:

class all real,guest,anonymous *

the * is supposed to allow all users
RAC_1
Honored Contributor

Re: ftpaccess file problem.

This works ---

class all real,anonymous,guest *

But not this

class local real,anonymous,guest *

Seems funny to me.

OR I will add all required user_names in class statement.

One More QUESTION.

Can I supress ftp codes in ftp session?

Thanks everybody.
There is no substitute to HARDWORK
Paul Sperry
Honored Contributor

Re: ftpaccess file problem.

class local real,anonymous,guest *
would not work on a remote system
I'd stick with

class all real,anonymous,guest *

that way local and remote would be the same.


I don't believe there is any "easy" way of
supressing ftp codes

SSP_1
Regular Advisor

Re: ftpaccess file problem.

Hi Anil ,

If you want to suppress it then why don't you remove /etc/ftpd/ftpaccess file itself , pl follow the below steps as root user.

1. rm /etc/ftpd/ftpaccess
2. vi /etc/inetd.conf and modify the line for ftp as below.
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l
3. inetd -c

Instead of ftpaccess try to control the users through /etc/ftpd/ftpusers , it's the easiest way. It works very well for me.



Obstacles exist to challenge you to keep going. Not to quit.