Script for enabling and disabling USB auto-mount

James S

New Member
Joined
Jan 25, 2024
Messages
1
Reaction score
0
Credits
12
Hi All

I'm working on a system that will have USB auto mounting disabled most of the time.
In some cases we'd like to enable it for specific user in the background.

How can I script the enable and disable of the USB auto-mount functionality in Suse?


James S.
 


How can I script the enable and disable of the USB auto-mount functionality in Suse?
Normally you need to run blkid and then identify USB device which is to be mounted.
I don't see how you could write a script to do this part.

If the user inserts different USB that means different UUID so you'd need to regex out UUID.
And to be able to do this you first need identify the "/dev/s..." part for which I'm not sure if a solution exists.
 

Members online


Top