Operating System - HP-UX
1830250 Members
2489 Online
110000 Solutions
New Discussion

Re: FTP is not working with root user

 
Deepu Chakravarty
Regular Advisor

FTP is not working with root user

Whenever we try to do any ftp from the server and try to connect with root user, it gives message "FTP Connection error: Failed to connect!530 User root access denied". Though we are giving correct root userid and password. FTP is connecting with other users. What to do so that we can connect ftp with root user?
19 REPLIES 19
Sherif A. Louis
Valued Contributor

Re: FTP is not working with root user

check the /var/adm/inetd.sec file
Kenan Erdey
Honored Contributor

Re: FTP is not working with root user

Hi,

check that if you have /etc/ftpd/ftpusers file.
if so remove root from it.

Kenan.
Computers have lots of memory but no imagination
Deepu Chakravarty
Regular Advisor

Re: FTP is not working with root user

Hi,
In this file every line is remarked. No Allow or Deny. May be some other issue.
Rasheed Tamton
Honored Contributor

Re: FTP is not working with root user

man ftpusers

ftpd rejects remote logins to local user accounts that are named in /etc/ftpd/ftpusers

So, remove the root from the above file.
Patrick Wallek
Honored Contributor

Re: FTP is not working with root user

>>In this file every line is remarked.

In which file? /var/adm/inetd.sec or /etc/ftpd/ftpusers?

If it is the /var/adm/inetd.sec, then that is fine. This file will NOT effect FTP for root. This file works off of host names and IP addresses ONLY, NOT user names.

You likely culprit is the ftpusers file.
Rasheed Tamton
Honored Contributor

Re: FTP is not working with root user

Did you check /etc/ftpd/ftpusers

Are you using bastille.

If so, check /etc/opt/sec_mgmt/bastille/config file
Shrikant Lavhate
Esteemed Contributor

Re: FTP is not working with root user

Hi,

As suggested by everybody above.

#more /etc/ftpd/ftpusers | grep -i root

If above output shows entry "root" then edit file in vi

#vi /etc/ftpd/ftpusers

and remove root entry from the file. And then try to ftp.

-=ShRi=-
Will it remain a personal, if I broadcast it here!
Shrikant Lavhate
Esteemed Contributor

Re: FTP is not working with root user

Or make it this way

# cat /etc/ftpd/ftpusers | grep -v root >test.op| cp test.op /etc/ftpd/ftpusers

Simple!
Will it remain a personal, if I broadcast it here!
Dennis Handly
Acclaimed Contributor

Re: FTP is not working with root user

>Shrikant: Or make it this way

It would be cleaner to remove the evil cat and remove the pipe (before the cp):
grep -v -w root /etc/ftpd/ftpusers > test.op
mv test.op /etc/ftpd/ftpusers
Deepu Chakravarty
Regular Advisor

Re: FTP is not working with root user

'ftpusers' file does not existing in my system. What to check next?
Anshumali
Esteemed Contributor

Re: FTP is not working with root user

Though it may not matter more but we can check....

Are you using any 3rd party client or its system default ftp? Is the behavior same with both. do you have any special characters in your password? Can you login with root on shell?
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Sharma Sanjeev
Respected Contributor

Re: FTP is not working with root user

Hi
Please check Below
Reasons FTP login could succeed:

/etc/ftpusers does not exist in system
/etc/ftpusers does not contain root

Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
Anshumali
Esteemed Contributor

Re: FTP is not working with root user

The location is /etc/ftpd/ftpusers, not /etc/ftpusers
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
Steven E. Protter
Exalted Contributor

Re: FTP is not working with root user

Shalom,

If you want to fail a security audit.

Enable root ftp.

This puts a protocol in place that broadcasts the root password all over your LAN in clear text.

Use a non-privileged user for ftp.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sharma Sanjeev
Respected Contributor

Re: FTP is not working with root user

Hi Anshumali

/etc/ftpd/ftpuser is there but also /etc/ftpuser is also there if you have seen properly.

Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
OFC_EDM
Respected Contributor

Re: FTP is not working with root user

Have you checked that root has a valid shell?

We had a similar issue years ago...I think that if the shell assigned to root is not in /etc/shells i don't believe the account will be able to FTP to the server.

I think it came down to the root account had a valid shell defined in /etc/passwd. But it wasn't in /etc/shells....someone "customized" the login at the time.

Regards
The Devil is in the detail.
Torsten.
Acclaimed Contributor

Re: FTP is not working with root user

According to SEP's comment you should consider to use sftp or scp.

Allowing ftp for root is just unsafe.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
OFC_EDM
Respected Contributor

Re: FTP is not working with root user

I agree as well not to use FTP for root.

Further on that we've completely removed FTP from all our environments. And we're very happy to have done it.
The Devil is in the detail.
Anshumali
Esteemed Contributor

Re: FTP is not working with root user

Sharma Sanjeev,

I thing you didn't check the man pages properly...See the location in man page...don't believe me, believe what your man page say....


Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!