Easy way/script to add another user like me?

Alan McKinnon alan at linuxholdings.co.za
Thu Feb 23 10:56:45 UTC 2006


On Thursday, 23 February 2006 00:22, William Grant wrote:
> Carthik Sharma wrote:
> > On 2/22/06, Dennis Kaarsemaker <dennis at kaarsemaker.net> wrote:
> >> On wo, 2006-02-22 at 00:16 -0500, Carthik Sharma wrote:
> >>> Is there a command, or a easy way to replicate all the
> >>> functions, roles and privileges of the default first-user?
> >>>
> >>> On my computer, can I create another user with the same
> >>> capabilities as me, on a desktop system, for testing purposes.
> >>> What is the easiest way to do this? I guess that would be
> >>> adding an admin user.
> >>
> >> System -> administration -> users and groups
> >> Add the user and give him the neccessary privileges.
> >
> > Dennis,
> >
> > Thanks for the reply -- how would I know what all privileges I
> > have, and what all groups I belong to. I thought there must be a
> > simpler way to "clone" a user, so to speak, or to create a
> > "default" admin user.
>
> When creating a new account, you should see an 'Advanced' tab. Go
> into there, and select Administrator in the Profile list.

Bah. That's the long way round, an activity encouraged by Windows. All 
you need do is grant the new user membership to the same groups as 
the admin user. On *nix we do things like that on the command line. To 
give my son (username connor) membership to the same groups as me 
(username alan) I do this:

sudo for i in `groups alan` ; do gpasswd -a connor $i ; done

Shout if you need that (reasonably complex) command dissected

-- 
Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five




More information about the ubuntu-users mailing list