R – Mount notifications on Solaris – as normal user (not root)


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!

Best Solution

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:


Related Question