Re: devel/arduino - bad advice given in pkg-message

2016-03-31 Thread Janky Jay, III
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Tom,

On 03/31/2016 04:46 AM, Warren Block wrote:
> On Sun, 27 Mar 2016, Warren Block wrote:
> 
>> Here is how I propose to rewrite that:
>> 
>> -G grouplist  Set secondary group memberships for an account. 
>> grouplist is a comma, space, or tab-separated list of group names
>> or group numbers.  /etc/group is modified to include the user's
>> name in the groups specified in grouplist.  The user's name is
>> removed from all groups not specified. Group membership changes
>> do not take effect for current user login sessions, requiring the
>> user to reconnect to be affected by the changes.  Note: do not
>> add a user to their primary group with grouplist.
> 
>> Modified version committed in 
>> https://svnweb.freebsd.org/base/head/usr.sbin/pw/pw.8?r1=297330=29
7329=297330
>
>> 
> I've been following this thread, have this question:
> 
> How does one add a user to additional groups without removing the
> user from groups the user is already in?
> 
> I just looked at the new manpage from a fresh svn update of src
> tree.
> 

This was actually covered in this thread (first post, actually) by
Torfinn Ingolfsen:

"Better to use this:
   pw groupmod dialer -m myuser
it will ony affect the dialer group, and not mess with any other groups.
"

The above will add the user "myuser" to the "dialer" group while
leaving the user's other group intact as well.

Regards,
Janky Jay, III

-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iEYEARECAAYFAlb9Nu4ACgkQGK3MsUbJZn7exACfZiXwVfIE762df3rfxVmdpd/K
CKkAnjgBMJ3ewsIlYlQB5OhkbKx2opT6
=Or1f
-END PGP SIGNATURE-
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: devel/arduino - bad advice given in pkg-message

2016-03-31 Thread Thomas Mueller
On Sun, 27 Mar 2016, Warren Block wrote:

> Here is how I propose to rewrite that:
>
> -G grouplist  Set secondary group memberships for an account.
>   grouplist is a comma, space, or tab-separated list of
>   group names or group numbers.  /etc/group is modified
>   to include the user's name in the groups specified in
>   grouplist.  The user's name is removed from all
>   groups not specified. Group membership changes do not
>   take effect for current user login sessions,
>   requiring the user to reconnect to be affected by the
>   changes.  Note: do not add a user to their primary
>   group with grouplist.

> Modified version committed in
> https://svnweb.freebsd.org/base/head/usr.sbin/pw/pw.8?r1=297330=297329=297330

I've been following this thread, have this question:

How does one add a user to additional groups without removing the user from 
groups the user is already in?

I just looked at the new manpage from a fresh svn update of src tree.

Tom

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: devel/arduino - bad advice given in pkg-message

2016-03-28 Thread Torfinn Ingolfsen
On Mon, Mar 28, 2016 at 5:56 AM, Warren Block  wrote:
> On Sun, 27 Mar 2016, Warren Block wrote:
>
>> Here is how I propose to rewrite that:
>>
>> -G grouplist  Set secondary group memberships for an account.
>>   grouplist is a comma, space, or tab-separated list of
>>   group names or group numbers.  /etc/group is modified
>>   to include the user's name in the groups specified in
>>   grouplist.  The user's name is removed from all
>>   groups not specified. Group membership changes do not
>>   take effect for current user login sessions,
>>   requiring the user to reconnect to be affected by the
>>   changes.  Note: do not add a user to their primary
>>   group with grouplist.
>
>
> Modified version committed in
> https://svnweb.freebsd.org/base/head/usr.sbin/pw/pw.8?r1=297330=297329=297330


Thanks!
-- 
Ragards,
Torfinn Ingolfsen
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: devel/arduino - bad advice given in pkg-message

2016-03-27 Thread Warren Block

On Sun, 27 Mar 2016, Warren Block wrote:


Here is how I propose to rewrite that:

-G grouplist  Set secondary group memberships for an account.
  grouplist is a comma, space, or tab-separated list of
  group names or group numbers.  /etc/group is modified
  to include the user's name in the groups specified in
  grouplist.  The user's name is removed from all
  groups not specified. Group membership changes do not
  take effect for current user login sessions,
  requiring the user to reconnect to be affected by the
  changes.  Note: do not add a user to their primary
  group with grouplist.


Modified version committed in
https://svnweb.freebsd.org/base/head/usr.sbin/pw/pw.8?r1=297330=297329=297330
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: devel/arduino - bad advice given in pkg-message

2016-03-27 Thread Warren Block

On Sat, 26 Mar 2016, Janky Jay, III wrote:


Hi Torfinn,

On 03/25/2016 10:20 AM, Torfinn Ingolfsen wrote:

On Fri, Mar 25, 2016 at 4:34 PM, Janky Jay, III 
wrote:


While your solution is not incorrect, your assumption on the
proposed/given solution from the port is. The '-G' switch appends
the given group to your users already given groups. So, if a user
belongs to groups admin,wheel,test and you run the suggested "pw"
command from the port, your user will now be in groups
admin,wheel,test,dialer. It's the '-g' (lower-case) switch you
want to avoid...



If you read the man page, I think you will find that it is your
assumption about what the '-G' switch does which is incorrect.
Quote: "-G grouplist" "Set additional group memberships for an
account.  grouplist is a comma, space or tab-separated list of
group names or group numbers.  The user's name is added to the
group lists in /etc/group, and removed from any groups not
specified in grouplist."

Please note the part which says "and removed from any groups not
specified in grouplist"



Ah yes! You are correct! For some reason I was mixing my "pw usermod"
and Linux "usermod" (where you use the -aG to append). My fault
entirely. Continue with your correct request for the update of the
false information. *fades into background*


For what it's worth, I wrote that message, and (try to) always test 
things like that to make sure they work.  It seems I missed that, 
though.


The way those options are explained in pw(8) is misleading.  Apparently 
"additional" was used in the sense of "all groups that are not the 
primary group", not in the sensing of adding groups.


Here is the current version (rewrapped):

 -G grouplist  Set additional group memberships for an account.
   grouplist is a comma, space or tab-separated list of
   group names or group numbers.  The user's name is
   added to the group lists in /etc/group, and removed
   from any groups not specified in grouplist.  Note: a
   user should not be added to their primary group with
   grouplist.  Also, group membership changes do not
   take effect for current user login sessions,
   requiring the user to reconnect to be affected by the
   changes.

Here is how I propose to rewrite that:

 -G grouplist  Set secondary group memberships for an account.
   grouplist is a comma, space, or tab-separated list of
   group names or group numbers.  /etc/group is modified
   to include the user's name in the groups specified in
   grouplist.  The user's name is removed from all
   groups not specified. Group membership changes do not
   take effect for current user login sessions,
   requiring the user to reconnect to be affected by the
   changes.  Note: do not add a user to their primary
   group with grouplist.

Feedback welcome.
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: devel/arduino - bad advice given in pkg-message

2016-03-26 Thread Janky Jay, III
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Torfinn,

On 03/25/2016 10:20 AM, Torfinn Ingolfsen wrote:
> On Fri, Mar 25, 2016 at 4:34 PM, Janky Jay, III 
> wrote:
>> 
>> While your solution is not incorrect, your assumption on the 
>> proposed/given solution from the port is. The '-G' switch appends
>> the given group to your users already given groups. So, if a user
>> belongs to groups admin,wheel,test and you run the suggested "pw"
>> command from the port, your user will now be in groups
>> admin,wheel,test,dialer. It's the '-g' (lower-case) switch you
>> want to avoid...
>> 
> 
> If you read the man page, I think you will find that it is your 
> assumption about what the '-G' switch does which is incorrect. 
> Quote: "-G grouplist" "Set additional group memberships for an
> account.  grouplist is a comma, space or tab-separated list of
> group names or group numbers.  The user's name is added to the
> group lists in /etc/group, and removed from any groups not
> specified in grouplist."
> 
> Please note the part which says "and removed from any groups not 
> specified in grouplist"
> 

Ah yes! You are correct! For some reason I was mixing my "pw usermod"
and Linux "usermod" (where you use the -aG to append). My fault
entirely. Continue with your correct request for the update of the
false information. *fades into background*

Regards,
Janky Jay, III
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iEYEARECAAYFAlb3HUQACgkQGK3MsUbJZn7YLgCfWOpBHTJfrBLKQfbWWX/qJzWt
OKUAn3MhgqhV08uwHMnC1+qseVaNkFVE
=khJo
-END PGP SIGNATURE-
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: devel/arduino - bad advice given in pkg-message

2016-03-25 Thread Torfinn Ingolfsen
On Fri, Mar 25, 2016 at 4:34 PM, Janky Jay, III  wrote:
>
> While your solution is not incorrect, your assumption on the
> proposed/given solution from the port is. The '-G' switch appends the
> given group to your users already given groups. So, if a user belongs
> to groups admin,wheel,test and you run the suggested "pw" command from
> the port, your user will now be in groups admin,wheel,test,dialer.
> It's the '-g' (lower-case) switch you want to avoid...
>

If you read the man page, I think you will find that it is your
assumption about what the '-G' switch does which is incorrect.
Quote:
"-G grouplist"
"Set additional group memberships for an account.  grouplist
is a comma, space or tab-separated list of group names or
group numbers.  The user's name is added to the group lists
in /etc/group, and removed from any groups not specified in
grouplist."

Please note the part which says "and removed from any groups not
specified in grouplist"
-- 
Regards,
Torfinn
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: devel/arduino - bad advice given in pkg-message

2016-03-25 Thread Janky Jay, III
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Torfinn,

On 03/25/2016 09:26 AM, Torfinn Ingolfsen wrote:
> Hello, The pkg-message for the devel/arduino port contains this:
> 
> "To allow serial port locking, add your user to the dialer group:" 
> "pw usermod myuser -G dialer"
> 
> It is  good to explain what a user have to do to get serial
> access. However, if you use that pw command, it will remove your
> user from any other groups than the dialer group. Which might be
> annoying. Better to use this: pw groupmod dialer -m myuser it will
> ony affect the dialer group, and not mess with any other groups. 
> HTH
> 

While your solution is not incorrect, your assumption on the
proposed/given solution from the port is. The '-G' switch appends the
given group to your users already given groups. So, if a user belongs
to groups admin,wheel,test and you run the suggested "pw" command from
the port, your user will now be in groups admin,wheel,test,dialer.
It's the '-g' (lower-case) switch you want to avoid...

That being said, your suggestion does the exact same thing. So,
really, either works.

Regards,
Janky Jay, III
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iEYEARECAAYFAlb1WoQACgkQGK3MsUbJZn43vACfQcs3E2IWsRaf2SACO1jMmFxt
PBsAnjuC5GSvEUvezKLWKS25WJyAGzuQ
=KEJX
-END PGP SIGNATURE-
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


devel/arduino - bad advice given in pkg-message

2016-03-25 Thread Torfinn Ingolfsen
Hello,
The pkg-message for the devel/arduino port contains this:

"To allow serial port locking, add your user to the dialer group:"
"pw usermod myuser -G dialer"

It is  good to explain what a user have to do to get serial access.
However, if you use that pw command, it will remove your user from any
other groups than the dialer group. Which might be annoying.
Better to use this:
   pw groupmod dialer -m myuser
it will ony affect the dialer group, and not mess with any other groups.
HTH
-- 
Regards,
Torfinn Ingolfsen
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"