Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 5113 - New adduser and deluser features request
Summary: New adduser and deluser features request
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-16 18:46 UTC by Christian Axelsson
Modified: 2007-09-14 15:03 UTC (History)
11 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
my test script (superadduser,14.69 KB, application/octet-stream)
2004-09-13 16:20 UTC, Chris Mathis
Details
superdeluser, a test script to remove the user from the system (superdeluser,5.97 KB, application/x-shellscript)
2006-08-04 01:07 UTC, Sohail
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Axelsson 2002-07-16 18:46:13 UTC
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.
Comment 1 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-07-28 20:22:33 UTC
Okay, this one may take a bit of time.
Comment 2 Martin Holzer (RETIRED) gentoo-dev 2003-07-09 11:48:41 UTC
how about app-admin/superadduser ?
Comment 3 Christian Axelsson 2003-07-10 04:35:03 UTC
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
Comment 4 Tom Arnold 2004-04-06 05:18:17 UTC
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.

Comment 5 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-05-01 08:03:11 UTC
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.
Comment 6 Christian Axelsson 2004-05-02 09:08:05 UTC
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.
Comment 7 Chris Mathis 2004-09-13 16:18:51 UTC
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.
Comment 8 Chris Mathis 2004-09-13 16:20:01 UTC
Created attachment 39542 [details]
my test script
Comment 9 Chris Mathis 2004-09-13 16:25:23 UTC
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
Comment 10 Bryan Østergaard (RETIRED) gentoo-dev 2005-10-01 12:22:48 UTC
Reassigning to RiverRat.
Comment 11 Florian Steinel 2006-05-01 12:15:48 UTC
hhm, maybe http://www.thkukuk.de/pam/pwdutils/ ?
... modify the information stored in NIS, NIS+, or LDAP
Comment 12 Gilles Dartiguelongue (RETIRED) gentoo-dev 2006-06-20 23:21:28 UTC
that would mean dropping shadowutils ?
But the request is more about templating adduser and deluser, isn't it ?
Comment 13 Sohail 2006-08-04 01:07:06 UTC
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.
Comment 14 Mike Kelly (RETIRED) gentoo-dev 2006-08-04 20:20:52 UTC
(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.
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2007-09-14 15:03:02 UTC
See Bug 53269, closing this, doesn't go anywhere plus don't see what really should be fixed here.