On Tue 29 Sep 2020 at 01:42:03 (+1300), Richard Hector wrote: > On 29/09/20 12:40 am, [email protected] wrote: > > On Monday, September 28, 2020 01:28:01 AM Richard Hector wrote: > >> On 26/09/20 2:47 pm, David Wright wrote: > >> > If you make yourself a member of the adm group, you can read your logs > >> > as a normal user. You'd need to type into any terminal > >> > > >> > $ sudo addgroup myloginname adm > >> > > >> > replacing myloginname as appropriate, but you will need to login again > >> > before the addgroup command will have any effect. > >> > >> I think you mean adduser rather than addgroup there: > >> > >> $ sudo adduser myloginname adm > >> > >> You're adding the user to the group, rather than the group to the user :-) > > > > I think either will work: > > > > from man adduser <one of five ways to invoke adduser>: > > > > Add an existing user to an existing group > > If called with two non-option arguments, adduser will add an > > existing user to an existing group. > > > > > > from man addgroup <one of five ways to invoke addgroup>: > > > > Add an existing user to an existing group > > If called with two non-option arguments, adduser will add an > > existing user to an existing group. > > Those are both the same manpage (adduser(8)), which describes both > commands. Both instances of that quote refer to adduser :-) > > addgroup is just a symlink to adduser, but behaves differently when > called with that name.
I just gave the OP a command that works. I hadn't expected it to kick off a discussion, nor to have to justify it. But: axis!david 08:55:22 ~ $ grep -e '^adm' -e '^unlock' /etc/group adm:x:4:david unlock:x:1010: axis!david 08:55:47 ~ $ grep -e '^adm' -e '^unlock' /etc/group adm:x:4:david,unlock unlock:x:1010: axis!david 08:56:40 ~ $ axis 08:51:11 ~# addgroup unlock adm Adding user `unlock' to group `adm' ... Adding user unlock to group adm Done. axis 08:56:28 ~# Or, if you prefer it in a time sequence: axis!david 08:55:22 ~ $ grep -e '^adm' -e '^unlock' /etc/group adm:x:4:david unlock:x:1010: axis!david 08:55:47 ~ $ grep -e '^adm' -e '^unlock' /etc/group axis 08:51:11 ~# addgroup unlock adm Adding user `unlock' to group `adm' ... Adding user unlock to group adm Done. axis 08:56:28 ~# axis!david 08:55:47 ~ $ grep -e '^adm' -e '^unlock' /etc/group adm:x:4:david,unlock unlock:x:1010: axis!david 08:56:40 ~ $ Buried in there is "addgroup unlock adm", where adm is the well-known group, and unlock is the user whose sole function is to lock and unlock /home partitions on my systems. Cheers, David.

