Add abstraction for useradd/remove/etc.
Submitted by Ryan Lortie Lortie
Assigned to Matthias Clasen
We currently hardcode a argv list to useradd and other commands more or less smack in the middle of a bunch of other code. Trouble is that the required commands are different on Debian-based systems and different again on BSD.
I think we should split out a separate file with add_user() rm_user() etc. functions which construct the argv the way each system likes it. That way we can add cases for various systems and keep the #ifdef mess well-contained.
Some vendor patches to look at:
Debian: http://patch-tracker.debian.org/patch/series/view/accountsservice/0.6.21-8/0002-create-and-manage-groups-like-on-a-debian-system.patch BSD: http://www.marcuscom.com:8080/viewvc/viewvc.cgi/marcuscom/ports/trunk/sysutils/accountsservice/files/patch-src_daemon.c?revision=17112&view=markup