Skip to contentSkip to conversation

$local and user change

DISCUSSION Gioele Barabucci 4 participants 5 messages Mar 3, 2004 – Mar 4, 2004

lore
Share & tools
lore
#0 lore raw

The $local change is nice, but I have one question about it:

user "joe" plugs his usbkey (or pccard) and use it.
Then logs out and "jack" logs in. Jack can't use the key (correctly owned by "joe", other users should not be able to read it) and can't even remove it (need to umount to avoid hw problems).

How should one solve this problem?

--
Gioele

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 8 lines · Gioele Barabucci

The $local change is nice, but I have one question about it:

user "joe" plugs his usbkey (or pccard) and use it.
Then logs out and "jack" logs in. Jack can't use the key (correctly owned by "joe", other users should not be able to read it) and can't even remove it (need to umount to avoid hw problems).

How should one solve this problem?

Not use the $local rule for such a device? :)

Seriously, it sounds like you should just give the device write access to a specific group of users, which is much easier to do.

thanks,

greg k-h

-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#2 lore raw
In reply to Gioele Barabucci
Quoted 7 lines · Greg KH
Quoted 2 lines

[usbkey]
How should one solve this problem?

Not use the $local rule for such a device? :)

Seriously, it sounds like you should just give the device write access to a specific group of users, which is much easier to do.

The same problem remains even with groups (if I want the usbkey only by the owner).
I don't see how chgrp'ing the device can be useful...

--
Gioele

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#3 lore raw
In reply to Gioele Barabucci
Quoted 11 lines · Gioele Barabucci
Quoted 7 lines · Greg KH
Quoted 2 lines

[usbkey]
How should one solve this problem?

Not use the $local rule for such a device? :)

Seriously, it sounds like you should just give the device write access to a specific group of users, which is much easier to do.

The same problem remains even with groups (if I want the usbkey only by the owner).
I don't see how chgrp'ing the device can be useful...

You are saying that you want a range of users to be able to use the device, right? Either put them all in the same group, or run some script at login/logout time, or have them unplug and replug the device.

thanks,

greg k-h

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#4 lore raw
In reply to Gioele Barabucci
Quoted 8 lines · Gioele Barabucci

The $local change is nice, but I have one question about it:

user "joe" plugs his usbkey (or pccard) and use it.
Then logs out and "jack" logs in. Jack can't use the key (correctly owned by "joe", other users should not be able to read it) and can't even remove it (need to umount to avoid hw problems).

How should one solve this problem?

You need to use something like pam_console to change certain device nodes at login/logout.

With udev, we need both solutions (a login/logout solution and a dynamic solution like $local).

Robert Love

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel