One option is to allow the user to do this automagically. If they've got system-config-samba installed, then the attached script (run as root) will do that. With some PolicyKit magic to do authentication and a suitably nasty "Are you really sure you want to do this? Do you trust all the users on this machine?" message, it might well work...
One option is to allow the user to do this automagically. If they've got system-config-samba installed, then the attached script (run as root) will do that. With some PolicyKit magic to do authentication and a suitably nasty "Are you really sure you want to do this? Do you trust all the users on this machine?" message, it might well work...