reasoning behind default primary group being user

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

reasoning behind default primary group being user

Joel Rees
I noticed when the installer created my first non-root (erg, first administration) user, it set the primary group to "user", and not even to "staff".

Later, I added a non-wheel user and it set the primary group there to "user", as well. So I checked around and found, in usermgmt.conf, that the group "user" is specified as the default.

My memory is that this is a change from the last time I experimented with obsd, circa v3.4 or so.

A quick google search of the FAQ, the web and of the openbsd.org public-facing tree for "openbsd default primary group" didn't bring me to any obvious reasoning.

So, can someone point me to the reasoning behind that, so I can figure out whether I want to change that to have the default group=uid that I'm used to?

--
Joel Rees <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: reasoning behind default primary group being user

Gregory Edigarov-2
On Thu, 30 Dec 2010 20:19:36 +0900
Joel Rees <[hidden email]> wrote:

> I noticed when the installer created my first non-root (erg, first
> administration) user, it set the primary group to "user", and not
> even to "staff".
>
> Later, I added a non-wheel user and it set the primary group there to
> "user", as well. So I checked around and found, in usermgmt.conf,
> that the group "user" is specified as the default.
>
> My memory is that this is a change from the last time I experimented
> with obsd, circa v3.4 or so.
>
> A quick google search of the FAQ, the web and of the openbsd.org
> public-facing tree for "openbsd default primary group" didn't bring
> me to any obvious reasoning.
>
> So, can someone point me to the reasoning behind that, so I can
> figure out whether I want to change that to have the default
> group=uid that I'm used to?
>
adduser will do the work for you.

--
With best regards,
        Gregory Edigarov

Reply | Threaded
Open this post in threaded view
|

Re: reasoning behind default primary group being user

Gregory Edigarov-2
On Thu, 30 Dec 2010 13:50:26 +0200
Gregory Edigarov <[hidden email]> wrote:

> On Thu, 30 Dec 2010 20:19:36 +0900
> Joel Rees <[hidden email]> wrote:
>
> > I noticed when the installer created my first non-root (erg, first
> > administration) user, it set the primary group to "user", and not
> > even to "staff".
> >
> > Later, I added a non-wheel user and it set the primary group there
> > to "user", as well. So I checked around and found, in usermgmt.conf,
> > that the group "user" is specified as the default.
> >
> > My memory is that this is a change from the last time I experimented
> > with obsd, circa v3.4 or so.
> >
> > A quick google search of the FAQ, the web and of the openbsd.org
> > public-facing tree for "openbsd default primary group" didn't bring
> > me to any obvious reasoning.
> >
> > So, can someone point me to the reasoning behind that, so I can
> > figure out whether I want to change that to have the default
> > group=uid that I'm used to?
> >
> adduser will do the work for you.
>
or try:
group =uid in /etc/usermgmt.conf, and read usermgmt.conf(5).
 

--
With best regards,
        Gregory Edigarov

Reply | Threaded
Open this post in threaded view
|

Re: reasoning behind default primary group being user

Ted Unangst-2
In reply to this post by Joel Rees
On Thu, Dec 30, 2010 at 6:19 AM, Joel Rees <[hidden email]> wrote:
> I noticed when the installer created my first non-root (erg, first administration) user, it set the primary group to "user", and not even to "staff".
>
> Later, I added a non-wheel user and it set the primary group there to "user", as well. So I checked around and found, in usermgmt.conf, that the group "user" is specified as the default.
>
> My memory is that this is a change from the last time I experimented with obsd, circa v3.4 or so.
>
> A quick google search of the FAQ, the web and of the openbsd.org public-facing tree for "openbsd default primary group" didn't bring me to any obvious reasoning.
>
> So, can someone point me to the reasoning behind that, so I can figure out whether I want to change that to have the default group=uid that I'm used to?

I'm not sure if your use of "user" means "same as username" or
"users".  There is no "user" group.

By default, I think we intend for a new user to get a new group, but
there's been some confusion in that department.

Reply | Threaded
Open this post in threaded view
|

Re: reasoning behind default primary group being user

Joel Rees
In reply to this post by Gregory Edigarov-2
On Thu, 30 Dec 2010 13:59:14 +0200
Gregory Edigarov <[hidden email]> wrote:

> On Thu, 30 Dec 2010 13:50:26 +0200
> Gregory Edigarov <[hidden email]> wrote:
>
> > On Thu, 30 Dec 2010 20:19:36 +0900
> > Joel Rees <[hidden email]> wrote:
> >
> > > [questions about setting up the default group for useradd, etc.]

> > adduser will do the work for you.

(muttering to myself about deja vu)

adduser and vipw vs. the various forms of the user command (useradd, etc.).

Yeah, I'm pretty sure I've gotten hung up here before. (ouch)

Thanks.

--
Joel Rees <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: reasoning behind default primary group being user

Joel Rees
In reply to this post by Ted Unangst-2
Hmm. (cross-posting to ppc@)

Something's odd, here.

On Thu, 30 Dec 2010 12:54:16 -0500
Ted Unangst <[hidden email]> wrote:

> On Thu, Dec 30, 2010 at 6:19 AM, Joel Rees <[hidden email]> wrote:
> > I noticed when the installer created my first non-root (erg, first administration) user, it set the primary group to "user", and not even to "staff".
> > [stuff about the useradd utilities that had me confused]
>
> I'm not sure if your use of "user" means "same as username" or
> "users".  There is no "user" group.

Yeah, I meant, "users".

> By default, I think we intend for a new user to get a new group, but
> there's been some confusion in that department.

Related to adduser vs. useradd, I suppose?

But, I thought I'd check the source to see which was being invoked in the install script (neither), and I discovered something odd.

http://www.openbsd.org/cgi-bin/cvsweb/src/distrib/miniroot/install.sh?rev=1.214;content-type=text%2Fplain

        uline="${user}:${_encr}:1000:1000:staff:0:0:${username}:/home/${user}:/bin/ksh"
        echo "$uline" >> /mnt/etc/master.passwd

and

        chown -R 1000:1000 /mnt/home/$user /mnt/var/mail/$user

But that's not what happened in my install, and it's not what is in the "install" script in my "/bsd.rd" .

Having a bit of a hard time finding the install script for the macppc iso in the source, so I'll copy those lines out of a boot of /bsd.rd:

        userline="$${user}:${_encr}:1000:10:staff:0:0:${username}:/home/${user}:/bin/ksh"

which explains why my initial administrator user declared from the install ended up in the "users" group. And

        chown -R 1000.10 /mnt/home/$user /mnt/var/mail/$user

which seems to mean that assigning the group as "users" might have been intentional?

Is this a bug that I should file?

--
Joel Rees <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: reasoning behind default primary group being user

patrick keshishian
On Thu, Dec 30, 2010 at 10:00 PM, Joel Rees <[hidden email]> wrote:
> Hmm. (cross-posting to ppc@)
>
> Something's odd, here.
>
> On Thu, 30 Dec 2010 12:54:16 -0500
> Ted Unangst <[hidden email]> wrote:
>
>> On Thu, Dec 30, 2010 at 6:19 AM, Joel Rees <[hidden email]> wrote:
>> > I noticed when the installer created my first non-root (erg, first
administration) user, it set the primary group to "user", and not even to
"staff".

>> > [stuff about the useradd utilities that had me confused]
>>
>> I'm not sure if your use of "user" means "same as username" or
>> "users".  There is no "user" group.
>
> Yeah, I meant, "users".
>
>> By default, I think we intend for a new user to get a new group, but
>> there's been some confusion in that department.
>
> Related to adduser vs. useradd, I suppose?
>
> But, I thought I'd check the source to see which was being invoked in the
install script (neither), and I discovered something odd.
>
>
http://www.openbsd.org/cgi-bin/cvsweb/src/distrib/miniroot/install.sh?rev=1.2
14;content-type=text%2Fplain
>
>      
 uline="${user}:${_encr}:1000:1000:staff:0:0:${username}:/home/${user}:/bin/k
sh"
>        echo "$uline" >> /mnt/etc/master.passwd
>
> and
>
>        chown -R 1000:1000 /mnt/home/$user /mnt/var/mail/$user
>
> But that's not what happened in my install, and it's not what is in the
"install" script in my "/bsd.rd" .

Are you comparing correct versions of install.sh?

The behavior changed in rev 1.210

http://www.openbsd.org/cgi-bin/cvsweb/src/distrib/miniroot/install.sh#rev1.21
0
http://www.openbsd.org/cgi-bin/cvsweb/src/distrib/miniroot/install.sh.diff?r1
=1.209;r2=1.210


--patrick




> Having a bit of a hard time finding the install script for the macppc iso in
the source, so I'll copy those lines out of a boot of /bsd.rd:
>
>      
 userline="$${user}:${_encr}:1000:10:staff:0:0:${username}:/home/${user}:/bin
/ksh"
>
> which explains why my initial administrator user declared from the install
ended up in the "users" group. And
>
>        chown -R 1000.10 /mnt/home/$user /mnt/var/mail/$user
>
> which seems to mean that assigning the group as "users" might have been
intentional?
>
> Is this a bug that I should file?
>
> --
> Joel Rees <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: reasoning behind default primary group being user

Joel Rees
On Thu, 30 Dec 2010 22:59:48 -0800
patrick keshishian <[hidden email]> wrote:

> On Thu, Dec 30, 2010 at 10:00 PM, Joel Rees <[hidden email]> wrote:
> > Hmm. (cross-posting to ppc@)
> >
> > [...]
> > But, I thought I'd check the source to see which was being invoked in the
> install script (neither), and I discovered something odd.
> >
> >
> http://www.openbsd.org/cgi-bin/cvsweb/src/distrib/miniroot/install.sh?rev=1.2
> 14;content-type=text%2Fplain
> >
> >      
>  uline="${user}:${_encr}:1000:1000:staff:0:0:${username}:/home/${user}:/bin/k
> sh"
> >        echo "$uline" >> /mnt/etc/master.passwd
> >
> > and
> >
> >        chown -R 1000:1000 /mnt/home/$user /mnt/var/mail/$user
> >
> > But that's not what happened in my install, and it's not what is in the
> "install" script in my "/bsd.rd" .
>
> Are you comparing correct versions of install.sh?
>
> The behavior changed in rev 1.210

Okay, that's dated after the freeze for 4.8, so this is not just a PPC issue.

Thanks.

> http://www.openbsd.org/cgi-bin/cvsweb/src/distrib/miniroot/install.sh#rev1.21
> 0
> http://www.openbsd.org/cgi-bin/cvsweb/src/distrib/miniroot/install.sh.diff?r1
> =1.209;r2=1.210

Okay, that's dated after the freeze for 4.8? so this is not just a PPC issue. And it's taken care of already.

Thanks.

>
> --patrick
>
>
>
>
> > Having a bit of a hard time finding the install script for the macppc iso in
> the source, so I'll copy those lines out of a boot of /bsd.rd:
> >
> >      
>  userline="$${user}:${_encr}:1000:10:staff:0:0:${username}:/home/${user}:/bin
> /ksh"
> >
> > which explains why my initial administrator user declared from the install
> ended up in the "users" group. And
> >
> >        chown -R 1000.10 /mnt/home/$user /mnt/var/mail/$user
> >
> > which seems to mean that assigning the group as "users" might have been
> intentional?
> >
> > Is this a bug that I should file?
> >

--
Joel Rees <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: reasoning behind default primary group being user

Alexander Hall-3
On 12/31/10 14:31, Joel Rees wrote:

> Okay, that's dated after the freeze for 4.8, so this is not just a PPC issue.

> Okay, that's dated after the freeze for 4.8? so this is not just a PPC issue. And it's taken care of already.

FWIW, distrib/miniroot/install.sh is not machine dependant.