Используйте команду RunSynchronous, чтобы добавить, изменить или удалить правила Windows Firewall.
Можно также использовать Unattend.xml с компонентом Networking-MPSSVC-Svc.
Больше информации о technet здесь
Assuming you only want to the be able to share files seamlessly between a group of users, on Linux you can set the 'set group id' bit on the directory:
chmod 2777 /shared
or
chmod g+s /shared
To make the files actually be owned by your user you would have to do some scripting. For example, running this find command suggested on wikipedia via a cron entry every minute.