proftpd / pam error

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
singeX
Forum User
Forum User
Posts: 28
Joined: Sat Jul 21, 2007 7:31 pm

proftpd / pam error

Unread post by singeX »

I am receiving some odd errors whenever there is a successful connection to the ftp server. Here is an excerpt from /var/log/secure:

Code: Select all

proftpd: Deprecated pam_stack module called from service "proftpd"
last message repeated 2 times
proftpd: pam_unix(proftpd:session): session opened for user ~username~ by (uid=0)
proftpd: Deprecated pam_stack module called from service "proftpd"
proftpd[6106]: ~servername~ (1.2.3.4[1.2.3.4]) - USER ~username~: Login successful.
proftpd[6106]: ~servername~ (1.2.3.4[1.2.3.4]) - Preparing to chroot to directory '/var/www/vhosts/~domainname~'
proftpd: Deprecated pam_stack module called from service "proftpd"
proftpd: pam_env(proftpd:setcred): Unable to open config file: /etc/security/pam_env.conf: No such file or directory
proftpd[6106]: ~servername~ (1.2.3.4[1.2.3.4]) - PAM(setcred): System error
proftpd: Deprecated pam_stack module called from service "proftpd"
proftpd: pam_succeed_if(proftpd:session): error retrieving information about user 0
proftpd: pam_unix(proftpd:session): session closed for user ~username~
proftpd[6106]: ~servername~ (1.2.3.4[1.2.3.4]) - PAM(close_session): System error
proftpd[6106]: ~servername~ (1.2.3.4[1.2.3.4]) - FTP session closed.
It's not adversely affecting anything but I wanted to make sure it wasn't anything serious. These errors shows up whether the connection was successful or not.
RichardM
Forum User
Forum User
Posts: 69
Joined: Sun Apr 20, 2008 2:51 pm

Unread post by RichardM »

I get this too.

I think it's benign - but I really wish I could get rid of it 'cos it clutters up my logs and OSSEC warnings!
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

On CentOS 4 that is part of the pam package:

rpm -qf /etc/security/pam_env.conf
pam-(none)-0.77-66.23


what distro are you on?
RichardM
Forum User
Forum User
Posts: 69
Joined: Sun Apr 20, 2008 2:51 pm

Unread post by RichardM »

It's RHEL5

I can get rid of the "deprecated pam stack" stuff:

These lines in /etc/pam.d/proftpd need to change:
auth required pam_stack.so service=system-auth
account required pam_stack.so service=system-auth
session required pam_stack.so service=system-auth

To:
auth include system-auth
account include system-auth
session include system-auth

But the 000's of var/log/secure error messages such as this remain and are stubborn:

Jul 15 14:11:55 domain.com proftpd: pam_env(proftpd:setcred): Unable to open config file: /etc/security/pam_env.conf: No such file or directory
Jul 15 14:11:55 domain.com proftpd: pam_succeed_if(proftpd:session): error retrieving information about user 0

The file /etc/security/pam_env.conf certainly DOES exist (but is not configured to do anything).
BerArt
Forum Regular
Forum Regular
Posts: 478
Joined: Tue Jan 15, 2008 3:57 am
Location: Netherlands

Unread post by BerArt »

I get this also on several CentOS 5 servers...
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

This is probably a problem with the plesk proftp package really. You're right though, it is benign.
singeX
Forum User
Forum User
Posts: 28
Joined: Sat Jul 21, 2007 7:31 pm

Unread post by singeX »

I forgot to specify versions in my original post. Since it's benign I'm not worried but here is some current package info anyway:

rpm -qf /etc/security/pam_env.conf
pam-0.99.6.2-3.26.el5
pam-0.99.6.2-3.26.el5

rpm -qa | grep pam-
psa-libpam-plesk-8.4.0-cos5.build84080425.19
pam-devel-0.99.6.2-3.26.el5
pam-0.99.6.2-3.26.el5
pam-0.99.6.2-3.26.el5
pam-devel-0.99.6.2-3.26.el5

rpm -qa | grep ftp
ftp-0.17-33.fc6
psa-proftpd-1.3.1-cos5.build84080425.19
psa-proftpd-xinetd-1.3.1-cos5.build84080425.19
lftp-3.5.1-2.fc6
psa-ftputil-8.4.0-cos5.build84080425.19

CentOS 5
2.6.23.1-3.art

If somebody does come up with a fix then please post it. I'm kind of OCD about silly stuff like this.
RichardM
Forum User
Forum User
Posts: 69
Joined: Sun Apr 20, 2008 2:51 pm

Unread post by RichardM »

I am too!

I think this may not be a ProFTPD problem. I posted the problem there and no one nailed it:

http://forums.proftpd.org/smf/index.php ... 459.0.html

The chroot idea sounds promising but it's a bit beyond me.
laughingbuddha
Forum Regular
Forum Regular
Posts: 512
Joined: Mon Mar 10, 2008 9:12 pm
Location: Southampton, UK

Unread post by laughingbuddha »

Did you ever get to the bottom of this, or is it an ongoing issue?

I've got another thread on this going on in the forum.

Matt
BerArt
Forum Regular
Forum Regular
Posts: 478
Joined: Tue Jan 15, 2008 3:57 am
Location: Netherlands

Unread post by BerArt »

No, I think it's a message that something went wrong during FTP upload, I have this on all 8 ASL servers every day several times...
RichardM
Forum User
Forum User
Posts: 69
Joined: Sun Apr 20, 2008 2:51 pm

Unread post by RichardM »

No, I have never been able to fix this. Irritating!

I don't think it's a sign of something "going wrong" with FTP upload though.
laughingbuddha
Forum Regular
Forum Regular
Posts: 512
Joined: Mon Mar 10, 2008 9:12 pm
Location: Southampton, UK

Unread post by laughingbuddha »

You can turn the message off though. I think I read it either on this forum or another. Been through sooo many thanks to google at the early hours of this morning.

I had the "Deprecated pam_stack" error too in mine. I wounder if it's a common issue with Plesk servers. I read on another server that it's a ProFTPD known bug, and other linux users (non plesk) have simply changed ftp app. I guess though that's not possible with Plesk.

I made the changes you noted here to my proftpd config, so I'll have to wait and see if that gets rid of the error.

The messages being sent to me on email I found were related to my own stupid fault. It turned out to be a process run on a radio studio playout system, that ftps up a file containing the current and previous tracks playing. I forgot about that and that I set it up. It only connects for between 0-1 seconds and the program used to do it is not an ftp app, but something built using VB.

I will also have check to see if it the emails are reporting all ftp connections. If it is I'm just going to turn off the message in the config.

Matt
laughingbuddha
Forum Regular
Forum Regular
Posts: 512
Joined: Mon Mar 10, 2008 9:12 pm
Location: Southampton, UK

Unread post by laughingbuddha »

Well the "Deprecated pam_stack" error has gone, but this one is still there:

Code: Select all

Jan 14 04:30:02 s1 proftpd: pam_env(proftpd:setcred): Unable to open config file: /etc/security/pam_env.conf: No such file or directory
And yes the emails keep coming...

I'm running another thread over here:

http://atomicrocketturtle.com/forum/vie ... 5362#15362

Matt
aus-city
Forum Regular
Forum Regular
Posts: 685
Joined: Thu Oct 26, 2006 11:56 pm

Re: proftpd / pam error

Unread post by aus-city »

The issue is from incorrect /etc/pam.d/proftpd calling up depreciated function.

Change it to this:

#%PAM-1.0
session optional pam_keyinit.so force revoke
auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
auth required pam_shells.so
auth include system-auth
account include system-auth
# Comment the following line if you are having PAM issues with chrooted users
#session include system-auth
session required pam_loginuid.so
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: proftpd / pam error

Unread post by faris »

I'm getting the "/etc/security/pam_env.conf" issue now on EL6 but I don't have the appropriate line in /etc/pam.d/proftpd to comment out :-(

Very annoying. I don't suppose anybody else has encountered this?
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
Post Reply