NIS Works!

I spent a few more minutes on Google tonight looking for reasons why NIS might not work on my home network. I’m still not sure why it didn’t work but I did get it working. On my Fedora 5 client I changed /etc/nsswitch.conf to contain the lines:

passwd: compat
shadow: compat
group: compat

Those lines previously contained:

passwd: files nis
shadow: files nis
group: files nis

I don’t think making this change was the fix, but I can go back and change it to “files nis” again to see if it breaks. I think the real fix was executing yppasswd [username] as root on the NIS client machine. After changing the password I was able to su to that user from another user account and log in from gdm.

I’m glad that battle is over. Now I just have to remember to change the NIS password of user accounts in the future. The next task is to set up an NFS home directory for NIS clients.

November 28th, 2006 | Personal | No comments

Quick Ant/JUnit status

I’m trying to get Ant to run my JUnit tests now but I keep getting

Testsuite: net.anthonychaves.test.geoip.locator.LocatorHelpersTest
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec

Caused an ERROR
net.anthonychaves.test.geoip.locator.LocatorHelpersTest
java.lang.ClassNotFoundException: net.anthonychaves.test.geoip.locator.LocatorHelpersTest
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)

I’m not sure how that can happen because the JUnit section of build.xml file looks like this:

[junit printsummary="yes" fork="yes" dir="${basedir}/build/classes/"]
[classpath]
[pathelement path="/home/anthony/jboss-4.0.4.GA/client/jboss-j2ee.jar"/]
[pathelement path="/home/anthony/eclipse/plugins/org.junit_3.8.1/junit.jar"/]
[pathelement path="/m2/ark/code/mysql-connector-java-3.1.12/mysql-connector-java-3.1.12-bin.jar"/]
[fileset dir="${basedir}/build/classes/"]
[include name="**/*Test.class"/]
[/fileset]
[/classpath]
[formatter type="plain"/]
[batchtest todir="/home/anthony/junit/reports" ]
[fileset dir="${basedir}/test/"]
[include name="**/*Test.java"/]
[/fileset]
[/batchtest]
[/junit]

I’m not sure why it can’t find the class at this point and I don’t have enough time to debug it tonight. It’s finding the class name well enough to try to run the test, but it’s not finding the class to do it. I guess I’ll have something to think about on my train ride tomorrow. Any suggestions would be helpful!

November 15th, 2006 | Java | 4 comments