tags:

views:

59

answers:

1

Does anyone know of a good (i.e. efficient) way of getting notifications of filesystem mounts/unmounts and/or new/removed devices in Solaris (10), without requiring root?

I'm trying to avoid simply polling /etc/mnttab for new/removed/changed entries, so my first prototype involved using sysevent_subscribe_event to listen for device events, and then using the device information in conjunction with /etc/mnttab to get the mount point. That works well, but sysevent_subscribe_event requires root privileges to run, and I'm not going to have access to the end-user's box, so I can't really elevate their privileges.

I imagine this could be quite tricky, given the restriction of running without root, but any help gratefully received!

A: 

Solaris 10 has role based access control so if you have root access to the box you can grant your user the authority to use the service. man roles and auth to get started, also here are two pages that look usefull:

marc

ms4720
Thanks for your answer, interesting idea; I actually don't have access to the box in this scenario though, should have made that clear.