Interesting. We have written a script that we place in /Library/StartupItems which works just fine under 10.4, but under 10.5, we get errors indicating that it's trying to access the UI session and isn't signed.
Have you changed your system configuration in any way to circumvent this? Or am I just missing something fundamental here? I do have lot's of sysadmin experience with SunOS and Linux, but very little when it comes to BSD and OSX, so it's plausible I'm going at this the wrong way.
If you post your script, I'm happy to try it and see if it works for me and learn from any misstakes I've made in my setup.