Logon scripts question

activedirectory

(quizhead) #1

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.


(Jeroen Visser) #2

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.


(quizhead) #3

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


(Jeroen Visser) #4

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.


(Dan) #5

You can, but you’ll need to install it: yum install nano.


(quizhead) #7

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


(Markus Neuberger) #8

Yes, that’s possible.


(quizhead) #10

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.


(Markus Neuberger) #11

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)…


(quizhead) #13

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.


(Jeroen Visser) #14

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


(quizhead) #15

Not working.


(Jeroen Visser) #16

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.


(Stefano Zamboni) #17

“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


(quizhead) #18

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,


(quizhead) #19

sorry I’m new to this.
Don’t know where are the logs.


(Jeroen Visser) #20

\\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.


(Jeroen Visser) #21


(quizhead) #23

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


(Markus Neuberger) #24

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