Web Hosting Talk







View Full Version : (cpanel + freebsd) proftpd login bug?


wKkaY
05-31-2004, 09:51 AM
hi, i'm using WHM 9.2.0 cPanel 9.2.0-S29 and FreeBSD 5.2.1.

i just found out that the entries in my /etc/proftpd/passwd.vhosts file had no passwords, meaning anyone can login with any password provided they already know a username.

after some checking, i found that /usr/local/cpanel/bin/mkvhostspasswd contains this piece of code:
chomp($system = `/bin/uname -s`);

if ($system =~ /freebsd/i) {
open(PWF,"/etc/master.passwd");
} else {
open(PWF,"/etc/shadow");
}

in FreeBSD, uname is in /usr/bin, and not /bin, so the FreeBSD check which follows that fails. because of that, no passwords are read from /etc/master.passwd and subsequently passwd.vhosts is filled with empty passwords.

the solution i did was simple, which was simply symlinking /usr/bin/uname -> /bin/uname.

if you're using this combination (fbsd + cpanel), i'm interested to know whether:

1) your mkvhostspasswd has the same code snippet as above
2) /bin/uname already exists

cheers :)

NetHosted-Andrew
05-31-2004, 10:24 AM
http://www.webhostingtalk.com/showthread.php?s=&threadid=274982

See the post by Bashar in this thread ;)

Andrew

wKkaY
05-31-2004, 10:55 AM
i see. so it's just not me alone.

i wonder how many cpanel/freebsd servers have been left 'open' in this way!

NetHosted-Andrew
05-31-2004, 10:57 AM
Is this the only bug you've found? Does FreeBSD play pretty nice with CPanel apart from this? As you can see from that other thread I'm interested in exlporing the FreeBSD angle :P

Andrew

wKkaY
05-31-2004, 11:24 AM
my experience with cpanel+freebsd has been pretty bad so far! to start off with, it's my first time using freebsd, and also my first time using cpanel ;)

i haven't started doing documentation, but from what i remember here are some of the problems i've run into..

1) WHM dies (sometimes a few times a day). quite a show-stopper, but at least the chksrvd brings it back up after awhile.
2) quotas run out of sync. solved by running fixquotas weekly
3) memory leak (not sure what's causing this. reference: http://lists.freebsd.org/pipermail/freebsd-questions/2004-May/045679.html ). i think it's gonna require a reboot every month or two.
4) this proftpd bug.

NetHosted-Andrew
05-31-2004, 11:34 AM
Thanks for the info, looks like I should keep clear for a while then :(

Andrew

wKkaY
05-31-2004, 11:05 PM
no worries :)

Bashar
06-01-2004, 01:34 AM
Thanks :D