Jump to content

Recommended Posts

Posted

Whenever a user logs on the NETLOGON folder appears. I'm stumped as to why this happens. Can anyone tell me how I can prevent this folder appearing when a user logs on to the network?

 

Just to mention, when an admin logs on the folder doesn't appear. When a non-administrator logs on (could be teaching staff etc) it appears.

 

Any suggestions will be welcomed.

 

Many thanks in advance.

Posted

I had this issue a while back.

 

On the logon scripts in both group policy and the individual user accounts, check there are no spaces at the end or begging on the script path. Also check there is a field simply with a space in and nothing else.

 

Z

  • Thanks 1
Posted

Hi,

 

I'm not sure what you mean by the beginning and end of the script path. Could you elaborate more on that, please?

 

As far as the filenames go, they have no spaces inbetween them.

Posted
Hi,

 

I'm not sure what you mean by the beginning and end of the script path. Could you elaborate more on that, please?

 

As far as the filenames go, they have no spaces inbetween them.

 

He means in the places like the active directory user object profiles tab or in gp where the files are pointed to. I.e. " global.vbs" or "global.vbs " in the logon script box instead of just "global.vbs"

  • Thanks 1
Posted
double check the logon scripts of people who do have this problem and compare them to people that dont have this problem. also check the permissions on any files in the netlogon folder that people will access.
Posted
He means in the places like the active directory user object profiles tab or in gp where the files are pointed to. I.e. " global.vbs" or "global.vbs " in the logon script box instead of just "global.vbs"

 

Oh, right. I've just checked the AD and in the profile tab --> login script path, there was a space. I've removed that space and every user account that now logs onto the network doesn't get the NETLOGON folder popping up.

 

Many thanks SYNACK and many thanks to FN-Greatermanchester too!

 

:)

Posted

Depending on how many people you might have with this problem, it sounds like something where a script will work wonders :-)

 

the following script queries AD for a list of all users who have a script set for them. It then loops through and checks to see if the script has a space at start or end (checks to see if the trimmed name is not the same as the untrimmed name). If they're different then it resets the script.

 

sLogFile="C:\temp\problems.csv"

Set oFSO=wscript.createobject("scripting.filesystemobject")
set oFile=ofso.createtextfile(sLogFile,true)
Set oRootDSE=GetObject("LDAP://RootDSE")
sRoot=oRootDSE.Get("DefaultNamingContext")

Set oConn = CreateObject("ADODB.Connection")
oConn.Provider = "ADsDSOObject"
oConn.Open
Set oCommand = CreateObject("ADODB.Command")
oCommand.ActiveConnection = oConn
oCommand.properties("Page Size")=100

oCommand.CommandText = ";(&(objectCategory=person)(scriptpath=*));sAMAccountName,scriptpath,distinguishedname;subTree"
Set oRS = oCommand.Execute
Do While Not oRS.EOF
 sUsername=oRS("sAMAccountName")
 sLoginScript=ors("scriptpath")
 if sLoginScript<>trim(sLoginScript) then
   wscript.echo sUserName & ",>" & sLoginScript & "<"
   set oUser=getobject("LDAP://" & ors("distinguishedname"))
   oUser.scriptpath=trim(sLoginScript)
   oFile.writeline sUserName & ",>" & sLoginScript & "<"
 end if
 oRS.MoveNext
Loop
oFile.close

Posted
Just curious did the script still run when the netlogon folder opened?

 

I think he had them set by group policy and the space on the user account was an error.

Posted
Just curious did the script still run when the netlogon folder opened?

 

The scripts that I had setup in the logon part of the GPO did still run even when the NETLOGON folder popped up.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...