Easy way/script to add another user like me?

William Grant tanarrifujitsu at optusnet.com.au
Thu Feb 23 21:17:14 UTC 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alan McKinnon wrote:
> 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.

Yes, I know that you just have to add them to the groups. However, many
people will prefer to not use the command line! It may be more efficient
and powerful to use the CLI, but it is more cryptic and harder to
remember for people that don't know what they are doing.

> 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

William.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFD/iZaGr2rfWFeutsRAoNJAJ9eda/pSwKSdVejVP9J3S4z2nChTgCdHeoz
mwaC4pYAOlLWZkMYxZs4v3U=
=el+6
-----END PGP SIGNATURE-----




More information about the ubuntu-users mailing list