After a long break from tasks over the summer I’m back into Nethserver. Looking forward to using and perhaps contributing more to the Nethserver community.
I’m setting up new users on our Nethserver domain and I’m looking for assistance on having my new users map a drive at login to a share used in our office. What are the marketplace apps and steps I use to set up a login.bat by user?
I found this post - Trying to map network drives to groups during login and it appears I need Samba. Does this mean I install the File Sharing App in Marketplace and then add a login.bat file to the templates-custom/samba folder?
Any help or pointers this community can give me are greatly appreciated.
Partially. You have to have Nethserver Samba DC(http://docs.nethserver.org/projects/nethserver-devel/en/v7/nethserver-dc.html) installed and running. Now Samba 4 is used and there is no “logon script = netlogon.bat” directive anymore. So you have to map the logon script via RSAT Tools. Here an example of user markus having netlogon.bat set as logon script(Win 7 VM screenshot):
Even if I set the rights to 777 only domain admins can access the netlogon share, but you may set it to 755 when you are ready with your netlogon.bat script, just for security.
Now you have access as domain admin from a Windows PC to “\\nsdc-server\netlogon\netlogon.bat” and may edit the netlogon.bat script to your needs to avoid dealing with different line breaks. Here you can see an example how to manage everything in a single logon script with if %username%. I put a pause in the logon script for testing.
Yes, for sure and Windows admins are used to mapping drives, so a central point to do this like web UI would be great! Tested it on SME now and I think it would be a nice feature. I saw there are per group scripts which is pretty real life scenario, another approach would be having it per user in one editable batch file(like “if %username==admin net use…”) or as web UI like in the SME module with the possibilty to edit the batchfile per user.
Hello @mrmarkuz and thank you for these useful instructions! Exactly what I needed. I’ve installed RSAT on a Windows 2012 R2 server and applied my logon.bat to each user for our shared folder. Works perfect!
Hey @stephdl…I’m game to try out any new Nethserver modules that may help me administer my office. But honestly I have to agree with @nrauso, using AD works very well. But for those installations where they don’t want to have to purchase another server to install RSAT on, perhaps Nethserver Tools would work best for those use cases.
If someone needs Samba then he needs it for Windows so he has the possibility to install RSAT on his Windows systems. But I still like the idea to do our own AD/GPO thing on Nethserver, with just changing ldap attributes and no dependence on Windows tools: Windows User Home Folders - SambaWiki.
It’s maybe more a “nice to have” than a “need to have”.
Thanks, yes i read this. But still a question: so i have to include the SME script on all clients oder does RSAT Tools modifiy samba service directly on the server? What about new users added? By assigning them to a group they automatically get drives incl the drive letters for their group? apologize for the question but i never needed RSAT Tools before Windows Version changed to 1809/1903.
complement:
I tried to access via RSAT Tools. Connect estabished but on accessing Net Logon I’m getting error message "Fehler beim Lesen der Bescheibung, Fehlercode 122). Modify not possible.
path /usr/lib64/samba/svcctl/smbd , also changing the account name ist not possible (grey)
Even if switching off firewall.
Is there any howto?