[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Testbed-admins] multiple admins



On Wed, 28 Apr, 2010 at 11:00:51 -0600, Robert P Ricci wrote:

> The answer is the first one you mentioned - create a regular user and
> set the admin bit to 1 in the database.

That's easy enough.  I asked in part because, source-diving newuser,
i found that the first user gets:

        DBQueryFatal("update users set ".
                     " admin=1,status='". $User::USERSTATUS_UNAPPROVED . "' " .
                     "where uid_idx='$usr_idx'");

        DBQueryFatal("insert into unixgroup_membership set ".
                     "uid='$new_uid', uid_idx='$usr_idx', gid='wheel'");

        DBQueryFatal("insert into unixgroup_membership set ".
                     "uid='$new_uid', uid_idx='$usr_idx', gid='$TBADMINGROUP'");

Except for users.status, i can guess what those things do, but it
sounds like the process is then:

 * Create the user
 * update users set admin=1
 * insert wheel and tbadmin entries for the UID into unixgroup_membership
 * run: setgroups <username> [1]

Is that everything?  (Or is the various unixgroup stuff not
necessary/desirable?)

Thanks.

Chaos

[1] http://users.emulab.net/trac/emulab/wiki/kb149

> 
> Thus spake Chaos Golubitsky on Wed, Apr 28, 2010 at 12:46:12PM -0400:
> > All,
> > 
> > I apologise in advance for what is probably a FAQ, but i didn't
> > quickly find an answer.
> > 
> > I've brought up an emulab, and would like to create more than one
> > user with admin privileges.  What's the easiest way to create the
> > second admin user?  (The second user hasn't been created yet at
> > all, so either "create an unprivileged user and set admin=1 plus
> > other things" or "directly create a privileged user" would be a
> > fine solution.)
> > 
> > Thanks.
> > 
> > Chaos
> > _______________________________________________
> > Testbed-admins mailing list
> > Testbed-admins@flux.utah.edu
> > http://www.flux.utah.edu/mailman/listinfo/testbed-admins