console and groups

console and groups

Post by Slyglif Ca » Thu, 04 Mar 1999 04:00:00



OK, this has probably been asked before, I can't can't seem to find anything
on the subject when searching through DejaNews.  Is there a way to setup Linux
so that when a user is logged in via ttyX that they are a member of a
particular group Y?  I would this this would be useful for allowing access to
certain devices depending on what terminal you are logged into (for example,
if you are logged into the console, you should have access to /dev/dsp*, if
you are logged into a particular serial line you might have access to some of
the /dev/hd* devices).

======================================================================
// Chris Giard (a.k.a. Slyglif Cain) | Life is like a box of dynamite,

 
 
 

console and groups

Post by Mike Co » Thu, 04 Mar 1999 04:00:00



>OK, this has probably been asked before, I can't can't seem to find anything
>on the subject when searching through DejaNews.  Is there a way to setup Linux
>so that when a user is logged in via ttyX that they are a member of a
>particular group Y?  I would this this would be useful for allowing access to
>certain devices depending on what terminal you are logged into (for example,
>if you are logged into the console, you should have access to /dev/dsp*, if
>you are logged into a particular serial line you might have access to some of
>the /dev/hd* devices).

>======================================================================
>// Chris Giard (a.k.a. Slyglif Cain) | Life is like a box of dynamite,


I use Debian, but I am sure it is atleast similar in most distros, so this
should help.  Go into you etc directory, and edit login.defs (as root of
course).  Look through the file, and somewhere near the end you should see a
line similar to:

        CONSOLE_GROUPS         floppy:audio:cdrom

and it has a very good description above it.  In case your distro doesn't
here it is:

# List of groups to add to the user's supplementary group set
# when logging in on the console (as determined by the CONSOLE
# setting).  Default is none.
#
# Use with caution - it is possible for users to gain permanent
# access to these groups, even when not logged in on the console.
# How to do it is left as an exercise for the reader...

I think this would be about what you need.

 
 
 

console and groups

Post by Slyglif Ca » Thu, 04 Mar 1999 04:00:00




Quote:> I use Debian, but I am sure it is atleast similar in most distros, so this
> should help.  Go into you etc directory, and edit login.defs (as root of
> course).  Look through the file, and somewhere near the end you should see a
> line similar to:

>    CONSOLE_GROUPS         floppy:audio:cdrom

> and it has a very good description above it.  In case your distro doesn't
> here it is:

> # List of groups to add to the user's supplementary group set
> # when logging in on the console (as determined by the CONSOLE
> # setting).  Default is none.
> #
> # Use with caution - it is possible for users to gain permanent
> # access to these groups, even when not logged in on the console.
> # How to do it is left as an exercise for the reader...

> I think this would be about what you need.

Thanks for the info, that was exactly what I was looking for.  Also, thanks
for including the comments section, as that was not a part of my file.
======================================================================
// Chris Giard (a.k.a. Slyglif Cain) | Life is like a box of dynamite,