[Novalug] Inherited folder/file access

donjr djr1952@hotpop.com
Tue Mar 6 23:08:34 EST 2007


I goofed on the command-line version.

On Tue, 2007-03-06 at 14:52 -0500, donjr wrote:

  The GUI version works as expected.

> 
> Now for the old fashion way before there where fancy graphical user
> interfaces to do this sort of thing.
> 
> It's:
>  # Add user 'sane' to the 'lp' group
>   $ sudo usermod -G lp sane
> 
>  # Add user 'twigboy2' to the 'lp' group
>   $ sudo usermod -G lp twigboy2
> 
> Repeat as needed.
> 
> See (man usermod) for more information.

This version would also REMOVE those users from any other group that
they belong to and only make them a member of 'lp'.

The correct command for adding user 'sane' to the 'lp' group
and leaving 'sane' a member of other groups they already belong to is:

  $ sudo usermod -G lp -a sane

Note the addition of the '-a' option.
 <sG> I new there was a reason I didn't like using 'usermod'.
      It's default behavior is a little strange  </sG>

> Note either way if 'user' is logged in while you make the changes said
> 'user' will have to log out and back in before they will see the changes
> take effect.

Also the user doesn't have to log out to see the changes take effect
anymore.

I have my system so configured that in order for 'sudo' {and a few other
administrator level things} to function you have to be a member of the
group 'admin'.

That said you can then imagian the problem I had fixing things after
when I ran the command:
   $ sudo usermod -G lp ${USER}

and found out that I was no longer logged in as an administrator level
account.

--  
-- 
 Don E. Groves, Jr. 

$ /usr/games/fortune : 
Your true value depends entirely on what you are compared with.



More information about the Novalug mailing list