This is the features I would like to see in a new adduser (and deluser) package: adduser ======= A configuration-file to set the following options: * Default shell * Default home * Location of /etc/skel * First and last UID to be used when adding new users * Permissions on home * A quota template to be applied on the new user * Letterhomes (ie. for user foo, create /home/f/foo) * Grouphomes (ie. for user foo that has office as default group, create /home/office/user) * Usergroups (put all new users in this group instead of creating a new group for each user, this group needs to be changeable) deluser ======= A configuration-file to set the following options: * Whether to or not to remove a users homedir * Whether to or not to backup a users homedir * Wheter not or not to remove all files on the system that belongs to the user * Wheter not or not to backup all files on the system that belongs to the user There're perl-scripts that can comply all this but I was told that to become a new system package, it needs to be bash or python.
Okay, this one may take a bit of time.
how about app-admin/superadduser ?
I suggest as an alternative the debian adduser package (http://packages.debian.org/unstable/base/adduser.html) Ok it depends on perl but providing is as an alternative would be nice. I tried to write an ebuild but I couldnt figure out howto do the perl-stuff
I second the debianpackage demmand. Providing adduser as just a link to useradd is kinda lame. I know about vigr and i am able to edit with vim. BUT portage often ask you to add a user to some group ( like games for playing AmericasArmy or something ) and it would be very elegant and nice for newbies to just have to type (debian-like): adduser Walker games or you could provide some more doku about that.
I agree that we need a proper adduser replacement. However, the only scripting languages I think we can safely rely on a micromal Gentoo system is bash and python, which means we'll need to roll our own.
Sounds fair that a replacement should be written in python or bash (I would perfer python because its pretty simple to learn). Any volunteers? The description of this bug contains a neat list of useful features.
well i think i will raise my hand and volunteer, expecially sense i just got done modifying the superadduer script, though i need to have people look at the code and tell me what they think. i will admit that this is the first time i have tried to modify someone elses scripts and such rather than making somthing very specific to my needs. i will post up the script and see what you think.
Created attachment 39542 [details] my test script
to make sure we are all on the same page, i took the original superadduser and modified it with items that are in the debian adduser, it is far from being done sense for now it just adds a user to a group if you do the "superadduser user group" though i would like to have it be a replacement for deluser as well in the future where it will findout what its name is and run a particular function. but i think that is a start
Reassigning to RiverRat.
hhm, maybe http://www.thkukuk.de/pam/pwdutils/ ? ... modify the information stored in NIS, NIS+, or LDAP
that would mean dropping shadowutils ? But the request is more about templating adduser and deluser, isn't it ?
Created attachment 93403 [details] superdeluser, a test script to remove the user from the system Hey, superdeluser(a test script) attempts at the feature requests for deluser. Instead of working on the real files, it works at the sample files so you.... copy /etc/passwd{,_sample} copy /etc/group{,_sample} PLEASE DO READ THE CODE BEFORE USING IT. Thanks.
(In reply to comment #0) > * Default shell > * Default home > * First and last UID to be used when adding new users > * Usergroups (put all new users in this group instead of creating a new group > for each user, this group needs to be changeable) These are all sorta covered by my implementation for GLEP 27 (still in progress). At the moment, it is aimed at use just within the package manager, but I'm sure it could be adapted to fulfil this goal, too. SVN Repo: http://soc.gentoo.org/viewcvs.py/glep0027/ You'd probably wanna check out the docs in trunk/dynusers/doc/, and the project proposal in the top of the repo. > There're perl-scripts that can comply all this but I was told that to become a > new system package, it needs to be bash or python. You're in luck! My scripts are written in bash! > * Location of /etc/skel > * Permissions on home > * A quota template to be applied on the new user > * Letterhomes (ie. for user foo, create /home/f/foo) > * Grouphomes (ie. for user foo that has office as default group, create > /home/office/user) > > deluser > ======= > A configuration-file to set the following options: > * Whether to or not to remove a users homedir > * Whether to or not to backup a users homedir > * Wheter not or not to remove all files on the system that belongs to the user > * Wheter not or not to backup all files on the system that belongs to the user Hmm... I don't think I have any direct way to configure this yet, as many of these options wouldn't be too useful just for users added for system packages. However, it would be easy enough to add these.
See Bug 53269, closing this, doesn't go anywhere plus don't see what really should be fixed here.