http://www.bludgeon.org/~rayvd/pysmb/c/pysmb.c The above program works perfectly when run as an ordinary user. However, as soon as I su to root and run it (or login as root) it Segmentation Faults. Any idea why this is? According to gdb it dies as soon as a call to anything from libsmbclient.so is called.