Linux

A talk on func, the fedora unified network controller. Ben Rose and I gave this talk at pug-ip (python users group in princeton) at the Princeton Public library on March 12, 2012.

FUNCtional system administration google-doc

FUNCtional system administration pdf



Update: I noticed that the syntax for vacationStart and vacationEnd do not permit integer comparisons. So I changed them from 1.3.6.1.4.1.1466.115.121.1.40 to 1.3.6.1.4.1.1466.115.121.1.15. This change allows you to make a gnarwl search string that uses the current time to check if a vacation is active.

I'm in the process of setting up gnarwl with our 389 (fedora directory server) and needed to import the vacation attributes and objectclass into 389. I only added the attributes I needed for vacation from the included ISP schema file.

Here is the ldif for…



This is just a case of RTFM but I thought I'd share...

I'm setting up ingo with dovecot sieve. I first verified that dovecot's sieve server is working properly by using the thunderbird sieve plugin (which is a sort of pointless plugin, you end up having to write in sieve language anyway, i'd expect a nicer gui front end like ingo has).

After making my backends.local.php in ingo's config directory, I did a tcpdump to verify that the web server was talking to the sieve server. Sadly it wasn't. (Sidebar…



While playing around with getting host entries to work with ldap, I found that my previous code for using gethostbyname was not running clean on puias6. Here is an updated version


#include
#include
#include
#include
#include
#include

int main(int argc, char **argv) {
int i;
struct hostent *hp;
struct in_addr **addr_list;

if (argc < 2) {
printf("Usage: %s hostname\n", argv[0]);
exit(1);
}

hp = gethostbyname(argv[1]);
if (hp == NULL) {
printf("gethostbyname(%s)…



We store our host information in ldap. Previously using ldap for host lookups was done by adding the appropriate entries to /etc/ldap.conf and changing nsswitch.conf.

With 6, nss_ldap has been replaced by nslcd, so I needed to change our setup a little.
I put the following into nslcd.conf


uid nslcd
gid ldap
uri ldap://ldap2.example.com
uri ldap://ldap.example.com
base dc=example,dc=com
# this is only host information, no need to use ssl
#ssl start_tls
#tls_cacertfile /etc/pki/tls/certs/ca-bundle.crt
base hosts ou=…



A friend of mine was talking about his design for a shell that would allow you to programatically reuse arguments. I started looking and found that bash can do this but not programatically (at least as far as I know). The syntax was slighty confusing but here is the summary, it blew my mind when I started using it (but I'll probably forget it again soon enough, like all the awesome things you can do in vi if you can remember...)

Here goes, lets copy a file from a deeply nested path to our location by first tab-completing the filename with ls


[thomas@…



After upgrading to horde 4.0.8 and imp 5.0.9 a few users had issues reading email. There were some messages missing, or for some users no messages at all.

In dimp/Dynamic the mailbox would fail to load and the message "Error communicating with Server" would be displayed, this was triggered by ajax_error (that's about as far as we got debugging).

In imp the mailbox would show thousands of messages but they would mostly say "Invalid Address" and "Unknown Date" with "No Subject".

Looking around we finally found…



There's probably an easier way to do this, but I just put this in my aliases and it works well enough.
alias fl='(for file in `find .??* * -maxdepth 0 -type d`; do du -hs $file 2>/dev/null; done) |sort -h -k 1'



One of our ldap seconaries was failing to stay in sync with the main server. We kept getting "Consumer failed to replay change" in the error log. The uniqueid and CSN were always the same, so at first I thought it was specific to the record that was being propogated. After a little looking, I found the following post: http://lists.fedoraproject.org/pipermail/389-users/2009-October/010278.html

In our case it was indeed the passwordRetryCount that was not being accepted at the consumer…



After putting cyanogen on my nookcolor, I wanted to try out a bluetooth keyboard. I borrowed an Apple keyboard from a friend and started playing. Initially I paired and it looked like it was going to work right out of the box but...

the connection kept breaking and I couldn't type more than a few characters in any app. I looked around and found Bluetooth keyboard easy connect int he market. I installed it and then rebooted as it advised. After that I didn't have to do anything, it just connected to the keyboard and it worked great for…