You are not logged in.
As known, NetworkManagerDispatcher is a daemon run by root, executing scripts in /etc/NetworkManager/dispatcher.d/ on interface-status-change.
I want to place a file in that directory which should execute a command as a certain user, precisely it is the command "fusesmb -o allow_other /media/SMB.net", which needs the config file ~/.smb/fusesmb.conf in that users home-dir.
Any idea, how to handle this?
Offline
You could try something like
su username - -c "fusesmb -o allow_other /media/SMB.net"
Offline
Thanks, smoon, it's now working as supposed to, although the correct command is:
su - username -c "fusesmb -o allow_other /media/SMB.net"
(Don't know, why the order of the "-" is important, but it's only working this way, not the other way around)
Offline