This page is a record of odd problems I've encountered during administration of FreeBSD.
This error occured after changing the permissions on the home directories of users on my system. I modified the permissions on all user's home directories to 0701 to stop users from changing into other user's directories to snoop around. However an unfortunate side-effect was that a wheel user account was no 'broken'.
It turned out I had accidentally set the permissions on the dir /home itself (as well as on each of the user's home directories). For this reason I think (fairly sure!) that the login capabilities config file, .login_conf, could not be read correctly - I think it needed wheel group permissions of greater than 0 to be read.
Lesson learnt (again!) from this was to 'script' all changes to permissions very carefully, including a full 'ls -al' of all the directories/files whose permissions were about to be changed before actually changing them. This way if something goes wrong, the script file can always be checked if something goes wrong and permissions need to be changed back to their original setting.
This error happens after proftpd is installed and a user logs in via ftp.
The solution is simple to add the following line to your configuration file for proftpd, /usr/local/etc/proftpd.conf:
AuthPAM off
By default on FreeBSD 4.7 it seems that proftpd does not have to use PAM to authenticate users and the errors are suppressed if PAM is not used
An irritating problem occured whereby I couldn't connect to the FreeBSD Samba share from my win2k machine after I'd implemented a set of IPF rules.
The solution was to add a rule to /etc/ipf.rules to allow inbound traffic to the broadcast address for my network.
When attempting to lookup a NetBIOS hostname from win2k, the win2k machine will send a broadcast message to every machine that it knows about on it's network using UDP port 137 in an attempt to resolve the NetBIOS host name to an IP address. In my case this is every machine in the network 213.152.51.192/29, which is to say it sends out a broadcast address to 213.152.51.199 (which will be recieved by every machine from 213.152.51.193 through 213.152.51.198 as I understand network broadcast addressing.
The problem in my case was that, although I had setup the following rule in IP Filter to allow in all traffic from 213.152.51.192/29:
pass in quick on fxp0 from 213.152.51.192/29 to 213.152.51.194
this rule did not allow in connections on the broadcast address 213.152.51.199. (I managed to work this out by running a packet sniffer - snort - noticing that when I tried to look up the share in win2k, several packets were received by 213.152.51.194 but blocked because the receipt address was actually 213.152.51.199.
In short then, the solution was to add the following rule to my IPF ruleset:
pass in quick on fxp0 from 213.152.51.192/29 to 213.152.51.199
http://www.snort.org
http://www.snort.org
http://munk.me.uk/ipf/
This is a very ugly problem and took me the best part of a day to figure out with the help from a mailing list item. I nearly passed out when the hack suggested in that mail worked straight off and am indebted to Gary W. Swearingen for posting his solution.
The solution, as outlined here is to modify the following line in the /etc/mail/freebsd.submit.mc file so it looks like this:
FEATURE(`msp',`[127.0.0.1]')
Once done, build the .cf files from the .mc files and install them using:
cd /etc/mail
make install/etc/mail/Makefile for details)
and finally restart the mailer using:
make restart
I found this trick worked first time and a stack of deferred mails shot out of the client queue. Job's a good un.