chrisccoulson,
I did some more reading through the Debian Policy and you are correct. It says to use the appropriate program in a post-init script to modify the files.
I found the program for nsswitch called auth-client-config that you invoke from the postinst to modify the nsswitch.conf file. Here's the link:
https://wiki.ubuntu.com/AuthClientConfig
I've been digging through the adduser command, but it doesn't appear to support the "+username" entries. I even tried with --force-badname and it doesn't appear to work. I get this:
Code:
adduser: To avoid problems, the username should consist only of
letters, digits, underscores, periods, at signs and dashes, and not start with
a dash (as defined by IEEE Std 1003.1-2001). For compatibility with Samba
machine accounts $ is also supported at the end of the username
zsh: exit 1 sudo adduser "\+blah" --force-badname
I had more success with the "useradd" command but there's no way to force it to omit the home and shell entirely. So far it's looking like Debian/Ubuntu have no means of creating the + entries through a script.
Bookmarks