Logon scripts question

Hi all,

A couple of question if I may:

  1. Can I use Nano for writing scripts directly in CentOs ? if no how can I use SSH to upload a script ?
  2. How can I write logon scripts for linux ? for example, I want the users to have their network drive letter after login to windows.

Thank you.

Heya,

Either wait a bit for my guide, or do the following:

Install Nethserver with AD account provider.
Administer your AD !CONTAINER! with Microsoft tools.

This means you CAN use nano, but you can also use your preferred text editor on Windoze and place logon scripts as per usual. Policies work as well, so that drive letter does not need to be mapped with a script ā€¦ you can just redirect the needed folders and couple a drive letter to the home share.

The is a bit of an issue with roaming profiles, as in, I havent gotten it to work yet, but otherwise it works like a charm.

1 Like

I will wait for your guide.
Iā€™m new to linux , I donā€™t know how to administer AD container with Microsoft tools and I donā€™t want to mix Linux and microsoft in the server

The short version of the guide is: connect your microsoft tools to nsdc-servername once you installed the AD account provider, and it will act as any regular AD environment.

When you install the AD account provider, you are asked for an IP in the same segment as your Nethserver green-interface. That is the IP you can connect to with mmc snap-ins.

You will have to ā€˜mixā€™ as Nethserver does not provide tools to administer the active directory, at all. Barring user creation, you need microsoft or compatible tools. The good thing is, they work like normal.

You can, but youā€™ll need to install it: yum install nano.

can I write regular windows scripts?
for example for net use:
net use a:\Network path /persistent: yes

Yes, thatā€™s possible.

Thank you for the answer.
Now, how can I relate this logon script to a specific user, in a way that whenever the user logs own he/she will see the the drive letter ?

Thank you.

Thereā€™s a thread about this:

Thereā€™s also a windows file server page and I just recognized an incredible AD howto from @planet_jeroen, both may also cover this topic (in future)ā€¦

I made the steps in this howto and Iā€™m not able to get to netlogon folder allthough Iā€™m using an admin user.
Any ideas ?
Thank you.

Just paste the script in \\nsdc-servername\netlogon and it should work when it is entered in the user-profile.

Not working.

I just created a file logon.bat in my netlogon share, with the following content:
net use k: \servername\share

I added ā€˜logon.batā€™ to my users profile as logon script, and have the expected share after logging out and back in. You probably have a typo somewhere if this doesnt work for you, or there is something else wrong. Without error logs it is hard to predict what is wrong.

ā€œnot workingā€ doesnā€™t work for us either, meaning that we canā€™t help you if you donā€™t help us to understandā€¦
please attach some logs or screenshots
thank you

1 Like

Iā€™m able to get to the nsdc server by using its IP through the user pc
meaning, I log on as administrator to the user pc and use \ip and not \nsdc-server.
But this is where I stopped,

sorry Iā€™m new to this.
Donā€™t know where are the logs.

\\ip\netlogon\ should work as well. You just place any script there, and reference it in the userprofile under the profile tab, as logon script, woithout the \\ip\netlogon part.

So if there is a script called abc.def in your netlogon share, you will only put abc.def in the logon script field of the user.

1 Like

This what I see and canā€™t get into netlogon and I donā€™t have the properties in your pic.
Unbenannt2

I tried it now and was able to connect via hostname instead of IP. The AD server which is a virtual container has itā€™s own name formed of nsdc-YOURNETHSERVERNAME. My NethServer is called server, so I have the AD container including the netlogonshare available with hostname nsdc-server.

grafik

1 Like