15. oktober 2005 - 15:11Der er
36 kommentarer og 1 løsning
Share drive (med AD - uden "script")
Jeg har lavet et fælles-folder som hedder "fællesdrev" Jeg har gjort følgende: Åbnet "Active directory users and computers" Klikket på "accounts" Højre klikket Valgt "new" --> "Shared folder" Name: "Fællesdrev" UNC name: \\Server\fællesdrev
Men når "brian" logger på systemet, så får han ikke tildelt folderen? (jeg kan sagtens lave --> net use f: \\server\fællesdrev og dermed mappen folderen til "brian" eller via explorer (tools) vælge "Map network drive")
Hvorfor mapper Active Directory ikke folderen ud til de enkelte bruger? / Eller hvordan løser jeg dette problem?
(PS. Jeg har 3 account-grupper, marketing,headquaters, production... jeg har valgt at lave dette share ét niveau op.. så det er meningen af alle 3 grupper gerne skulle få adgang til fællesdrev)
bat filen gemmer du i sysvol scripts, så opretter du en GPO og under user configuration -> windows settings -> scripts (logon / logoff), og henviser til bat filen, denne gpo skal så være på overordnet niveau til de brugere / OU som den skal gælde for
Nu har jeg prøvet det.. men det virker ikke rigtigt... :-/
Når "brian" er logget på er der ikke noget faellesdrev (æ omdøbt til ae)... men hvis brian finder scriptet i Sysvol via netværket og dobbletklikker på filen x.bat så bliver der mappet et faellesdrev.. :-\
hvordan har dutildelt dem den GPO ? har du oprettet en OU og plaeet dine brugere i den ? (og hvis du henter group policy management fra mss, er det meget nemmere at se hvad der sker, og hvor GPO´s er / burde være aktive)
jo jo.. jeg har den nye GPO fra microsoft. Har lavet en OU (accounts).. og gået ét niveau op.. og lavet et GPO som hedder "Share", bagefter "edit" og gået til "user settings" --> logon
Når jeg kører scriptet får jeg følgende meddelse (dobbeltklikket manuelt via sysvol, faellesdrevet bliver stadigvæk mappet korrekt)
\\Server\domain\sysvol\test.com\policies\{31B2F340-016D-11D2-945F}\USER\Scripts\Logon CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to the windows directory.
Her er et som jeg har kørende og fungere via det som brille beskriver med AD.
echo Hello %USERNAME%, welcome to the network! echo You are accessing the network from %COMPUTERNAME% echo And you are running the %OS% os. echo Please wait, authenticating %USERNAME% with the %DOMÆNE NAVN% domain net use U: /del net use P: /del net use U: \\MY_SERVER\users net use P: \\MY_other_server\public net time \\SERVER NAVN /set /yes
Function IsSectionHeader(obj) IsSectionHeader = (obj.className = "he0_expanded") Or (obj.className = "he1_expanded") Or (obj.className = "he1") Or (obj.className = "he2") Or (obj.className = "he3") Or (obj.className = "he4") Or (obj.className = "he4h") Or (obj.className = "he5") Or (obj.className = "he5h") End Function
Function IsSectionExpandedByDefault(objHeader) IsSectionExpandedByDefault = (Right(objHeader.className, Len("_expanded")) = "_expanded") End Function
' strState must be show | hide | toggle Sub SetSectionState(objHeader, strState) ' Get the container object for the section. It's the first one after the header obj.
i = objHeader.sourceIndex Set all = objHeader.parentElement.document.all While (all(i).className <> "container") i = i + 1 Wend
Set objContainer = all(i)
If strState = "toggle" Then If objContainer.style.display = "none" Then SetSectionState objHeader, "show" Else SetSectionState objHeader, "hide" End If
Else Set objExpando = objHeader.children.item(1)
If strState = "show" Then objContainer.style.display = "block" objExpando.innerText = strHide
ElseIf strState = "hide" Then objContainer.style.display = "none" objExpando.innerText = strShow End If End If End Sub
Sub ShowSection(objHeader) SetSectionState objHeader, "show" End Sub
Sub HideSection(objHeader) SetSectionState objHeader, "hide" End Sub
Sub ToggleSection(objHeader) SetSectionState objHeader, "toggle" End Sub
'================================================================================ ' When user clicks anywhere in the document body, determine if user is clicking ' on a header element. '================================================================================ Function document_onclick() Set strsrc = window.event.srcElement
While (strsrc.className = "sectionTitle" Or strsrc.className = "expando" Or strsrc.className = "vmlimage") Set strsrc = strsrc.parentElement Wend
' Only handle clicks on headers. If Not IsSectionHeader(strsrc) Then Exit Function
ToggleSection strsrc
window.event.returnValue = False End Function
'================================================================================ ' link at the top of the page to collapse/expand all collapsable elements '================================================================================ Function objshowhide_onClick() Set objBody = document.body.all Select Case strShowHide Case 0 strShowHide = 1 objshowhide.innerText = strShowAll For Each obji In objBody If IsSectionHeader(obji) Then HideSection obji End If Next Case 1 strShowHide = 0 objshowhide.innerText = strHideAll For Each obji In objBody If IsSectionHeader(obji) Then ShowSection obji End If Next End Select End Function
'================================================================================ ' onload collapse all except the first two levels of headers (he0, he1) '================================================================================ Function window_onload() ' Only initialize once. The UI may reinsert a report into the webbrowser control, ' firing onLoad multiple times. If UCase(document.documentElement.getAttribute("gpmc_reportInitialized")) <> "TRUE" Then
' Initialize sections to default expanded/collapsed state. Set objBody = document.body.all
For Each obji in objBody If IsSectionHeader(obji) Then If IsSectionExpandedByDefault(obji) Then ShowSection obji Else HideSection obji End If End If Next
objshowhide.innerText = strShowAll
document.documentElement.setAttribute "gpmc_reportInitialized", "true" End If End Function
'================================================================================ ' When direction (LTR/RTL) changes, change adjust for readability '================================================================================ Function document_onPropertyChange() If window.event.propertyName = "dir" Then Call fDetDir(UCase(document.dir)) End If End Function Function fDetDir(strDir) strDir = UCase(strDir) Select Case strDir Case "LTR" Set colRules = document.styleSheets(0).rules For i = 0 To colRules.length -1 Set nug = colRules.item(i) strClass = nug.selectorText If nug.style.textAlign = "right" Then nug.style.textAlign = "left" End If Select Case strClass Case "DIV .expando" nug.style.Left = "" nug.style.right = strExpandoNumPixelsFromEdge Case "#objshowhide" nug.style.textAlign = "right" End Select Next Case "RTL" Set colRules = document.styleSheets(0).rules For i = 0 To colRules.length -1 Set nug = colRules.item(i) strClass = nug.selectorText If nug.style.textAlign = "left" Then nug.style.textAlign = "right" End If Select Case strClass Case "DIV .expando" nug.style.Left = strExpandoNumPixelsFromEdge nug.style.right = "" Case "#objshowhide" nug.style.textAlign = "left" End Select Next End Select End Function
'================================================================================ 'When printing reports, if a given section is expanded, let's says "shown" (instead of "hide" in the UI). '================================================================================ Function window_onbeforeprint() For Each obji In document.all If obji.className = "expando" Then If obji.innerText = strHide Then obji.innerText = strShown If obji.innerText = strShow Then obji.innerText = strHidden End If Next End Function
'================================================================================ 'If a section is collapsed, change to "hidden" in the printout (instead of "show"). '================================================================================ Function window_onafterprint() For Each obji In document.all If obji.className = "expando" Then If obji.innerText = strShown Then obji.innerText = strHide If obji.innerText = strHidden Then obji.innerText = strShow End If Next End Function
'================================================================================ ' Adding keypress support for accessibility '================================================================================ Function document_onKeyPress() If window.event.keyCode = "32" Or window.event.keyCode = "13" Or window.event.keyCode = "10" Then 'space bar (32) or carriage return (13) or line feed (10) If window.event.srcElement.className = "expando" Then Call document_onclick() : window.event.returnValue = false If window.event.srcElement.className = "sectionTitle" Then Call document_onclick() : window.event.returnValue = false If window.event.srcElement.id = "objshowhide" Then Call objshowhide_onClick() : window.event.returnValue = false End If End Function
--> </script>
<!-- Script 2 -->
<script language="javascript"> <!-- function getExplainWindowTitle() { return document.getElementById("explainText_windowTitle").innerHTML; }
function getExplainWindowStyles() { return document.getElementById("explainText_windowStyles").innerHTML; }
function getExplainWindowSettingPathLabel() { return document.getElementById("explainText_settingPathLabel").innerHTML; }
function getExplainWindowExplainTextLabel() { return document.getElementById("explainText_explainTextLabel").innerHTML; }
function getExplainWindowPrintButton() { return document.getElementById("explainText_printButton").innerHTML; }
function getExplainWindowCloseButton() { return document.getElementById("explainText_closeButton").innerHTML; }
function getNoExplainTextAvailable() { return document.getElementById("explainText_noExplainTextAvailable").innerHTML; }
function getExplainWindowSupportedLabel() { return document.getElementById("explainText_supportedLabel").innerHTML; }
function getNoSupportedTextAvailable() { return document.getElementById("explainText_noSupportedTextAvailable").innerHTML; }
function showExplainText(srcElement) { var strSettingName = srcElement.getAttribute("gpmc_settingName"); var strSettingPath = srcElement.getAttribute("gpmc_settingPath"); var strSettingDescription = srcElement.getAttribute("gpmc_settingDescription");
if (strSettingDescription == "") { strSettingDescription = getNoExplainTextAvailable(); }
var strSupported = srcElement.getAttribute("gpmc_supported");
if (strSupported == "") { strSupported = getNoSupportedTextAvailable(); }
jeg dropper fra nu, gider ikke scrolle SÅ meget ned hver gang *S* (ønsker du mere hjælp herfra, så luk dette spoørgsmål og opret et nyt med henvisning hertil)
Function IsSectionHeader(obj) IsSectionHeader = (obj.className = "he0_expanded") Or (obj.className = "he1_expanded") Or (obj.className = "he1") Or (obj.className = "he2") Or (obj.className = "he3") Or (obj.className = "he4") Or (obj.className = "he4h") Or (obj.className = "he5") Or (obj.className = "he5h") End Function
Function IsSectionExpandedByDefault(objHeader) IsSectionExpandedByDefault = (Right(objHeader.className, Len("_expanded")) = "_expanded") End Function
' strState must be show | hide | toggle Sub SetSectionState(objHeader, strState) ' Get the container object for the section. It's the first one after the header obj.
i = objHeader.sourceIndex Set all = objHeader.parentElement.document.all While (all(i).className <> "container") i = i + 1 Wend
Set objContainer = all(i)
If strState = "toggle" Then If objContainer.style.display = "none" Then SetSectionState objHeader, "show" Else SetSectionState objHeader, "hide" End If
Else Set objExpando = objHeader.children.item(1)
If strState = "show" Then objContainer.style.display = "block" objExpando.innerText = strHide
ElseIf strState = "hide" Then objContainer.style.display = "none" objExpando.innerText = strShow End If End If End Sub
Sub ShowSection(objHeader) SetSectionState objHeader, "show" End Sub
Sub HideSection(objHeader) SetSectionState objHeader, "hide" End Sub
Sub ToggleSection(objHeader) SetSectionState objHeader, "toggle" End Sub
'================================================================================ ' When user clicks anywhere in the document body, determine if user is clicking ' on a header element. '================================================================================ Function document_onclick() Set strsrc = window.event.srcElement
While (strsrc.className = "sectionTitle" Or strsrc.className = "expando" Or strsrc.className = "vmlimage") Set strsrc = strsrc.parentElement Wend
' Only handle clicks on headers. If Not IsSectionHeader(strsrc) Then Exit Function
ToggleSection strsrc
window.event.returnValue = False End Function
'================================================================================ ' link at the top of the page to collapse/expand all collapsable elements '================================================================================ Function objshowhide_onClick() Set objBody = document.body.all Select Case strShowHide Case 0 strShowHide = 1 objshowhide.innerText = strShowAll For Each obji In objBody If IsSectionHeader(obji) Then HideSection obji End If Next Case 1 strShowHide = 0 objshowhide.innerText = strHideAll For Each obji In objBody If IsSectionHeader(obji) Then ShowSection obji End If Next End Select End Function
'================================================================================ ' onload collapse all except the first two levels of headers (he0, he1) '================================================================================ Function window_onload() ' Only initialize once. The UI may reinsert a report into the webbrowser control, ' firing onLoad multiple times. If UCase(document.documentElement.getAttribute("gpmc_reportInitialized")) <> "TRUE" Then
' Initialize sections to default expanded/collapsed state. Set objBody = document.body.all
For Each obji in objBody If IsSectionHeader(obji) Then If IsSectionExpandedByDefault(obji) Then ShowSection obji Else HideSection obji End If End If Next
objshowhide.innerText = strShowAll
document.documentElement.setAttribute "gpmc_reportInitialized", "true" End If End Function
'================================================================================ ' When direction (LTR/RTL) changes, change adjust for readability '================================================================================ Function document_onPropertyChange() If window.event.propertyName = "dir" Then Call fDetDir(UCase(document.dir)) End If End Function Function fDetDir(strDir) strDir = UCase(strDir) Select Case strDir Case "LTR" Set colRules = document.styleSheets(0).rules For i = 0 To colRules.length -1 Set nug = colRules.item(i) strClass = nug.selectorText If nug.style.textAlign = "right" Then nug.style.textAlign = "left" End If Select Case strClass Case "DIV .expando" nug.style.Left = "" nug.style.right = strExpandoNumPixelsFromEdge Case "#objshowhide" nug.style.textAlign = "right" End Select Next Case "RTL" Set colRules = document.styleSheets(0).rules For i = 0 To colRules.length -1 Set nug = colRules.item(i) strClass = nug.selectorText If nug.style.textAlign = "left" Then nug.style.textAlign = "right" End If Select Case strClass Case "DIV .expando" nug.style.Left = strExpandoNumPixelsFromEdge nug.style.right = "" Case "#objshowhide" nug.style.textAlign = "left" End Select Next End Select End Function
'================================================================================ 'When printing reports, if a given section is expanded, let's says "shown" (instead of "hide" in the UI). '================================================================================ Function window_onbeforeprint() For Each obji In document.all If obji.className = "expando" Then If obji.innerText = strHide Then obji.innerText = strShown If obji.innerText = strShow Then obji.innerText = strHidden End If Next End Function
'================================================================================ 'If a section is collapsed, change to "hidden" in the printout (instead of "show"). '================================================================================ Function window_onafterprint() For Each obji In document.all If obji.className = "expando" Then If obji.innerText = strShown Then obji.innerText = strHide If obji.innerText = strHidden Then obji.innerText = strShow End If Next End Function
'================================================================================ ' Adding keypress support for accessibility '================================================================================ Function document_onKeyPress() If window.event.keyCode = "32" Or window.event.keyCode = "13" Or window.event.keyCode = "10" Then 'space bar (32) or carriage return (13) or line feed (10) If window.event.srcElement.className = "expando" Then Call document_onclick() : window.event.returnValue = false If window.event.srcElement.className = "sectionTitle" Then Call document_onclick() : window.event.returnValue = false If window.event.srcElement.id = "objshowhide" Then Call objshowhide_onClick() : window.event.returnValue = false End If End Function
--> </script>
<!-- Script 2 -->
<script language="javascript"> <!-- function getExplainWindowTitle() { return document.getElementById("explainText_windowTitle").innerHTML; }
function getExplainWindowStyles() { return document.getElementById("explainText_windowStyles").innerHTML; }
function getExplainWindowSettingPathLabel() { return document.getElementById("explainText_settingPathLabel").innerHTML; }
function getExplainWindowExplainTextLabel() { return document.getElementById("explainText_explainTextLabel").innerHTML; }
function getExplainWindowPrintButton() { return document.getElementById("explainText_printButton").innerHTML; }
function getExplainWindowCloseButton() { return document.getElementById("explainText_closeButton").innerHTML; }
function getNoExplainTextAvailable() { return document.getElementById("explainText_noExplainTextAvailable").innerHTML; }
function getExplainWindowSupportedLabel() { return document.getElementById("explainText_supportedLabel").innerHTML; }
function getNoSupportedTextAvailable() { return document.getElementById("explainText_noSupportedTextAvailable").innerHTML; }
function showExplainText(srcElement) { var strSettingName = srcElement.getAttribute("gpmc_settingName"); var strSettingPath = srcElement.getAttribute("gpmc_settingPath"); var strSettingDescription = srcElement.getAttribute("gpmc_settingDescription");
if (strSettingDescription == "") { strSettingDescription = getNoExplainTextAvailable(); }
var strSupported = srcElement.getAttribute("gpmc_supported");
if (strSupported == "") { strSupported = getNoSupportedTextAvailable(); }
RSOP data for CONTOSO\Administrator on HQ-CON-DC-01 : Logging Mode -------------------------------------------------------------------
OS Type: Microsoft(R) Windows(R) Server 2003, Enterprise Edition OS Configuration: Primary Domain Controller OS Version: 5.2.3790 Terminal Server Mode: Remote Administration Site Name: Default-First-Site-Name Roaming Profile: Local Profile: C:\Documents and Settings\Administrator Connected over a slow link?: No
COMPUTER SETTINGS ------------------ CN=HQ-CON-DC-01,OU=Domain Controllers,DC=contoso,DC=com Last time Group Policy was applied: 15-10-2005 at 21:58:03 Group Policy was applied from: hq-con-dc-01.contoso.com Group Policy slow link threshold: 500 kbps Domain Name: CONTOSO Domain Type: Windows 2000
Applied Group Policy Objects ----------------------------- Default Domain Controllers Policy Default Domain Policy Local Group Policy
The computer is a part of the following security groups ------------------------------------------------------- BUILTIN\Administrators Everyone BUILTIN\Pre-Windows 2000 Compatible Access BUILTIN\Users Windows Authorization Access Group NT AUTHORITY\NETWORK NT AUTHORITY\Authenticated Users This Organization HQ-CON-DC-01$ Domain Controllers NT AUTHORITY\ENTERPRISE DOMAIN CONTROLLERS
USER SETTINGS -------------- CN=Administrator,CN=Users,DC=contoso,DC=com Last time Group Policy was applied: 15-10-2005 at 21:28:31 Group Policy was applied from: hq-con-dc-01.contoso.com Group Policy slow link threshold: 500 kbps Domain Name: CONTOSO Domain Type: Windows 2000
Applied Group Policy Objects ----------------------------- Default Domain Policy
The following GPOs were not applied because they were filtered out ------------------------------------------------------------------- Local Group Policy Filtering: Not Applied (Empty)
The user is a part of the following security groups --------------------------------------------------- Domain Users Everyone BUILTIN\Administrators BUILTIN\Users BUILTIN\Pre-Windows 2000 Compatible Access NT AUTHORITY\INTERACTIVE NT AUTHORITY\Authenticated Users This Organization LOCAL Enterprise Admins Domain Admins Schema Admins Group Policy Creator Owners
The user has the following security privileges ----------------------------------------------
Bypass traverse checking Manage auditing and security log Back up files and directories Restore files and directories Change the system time Shut down the system Force shutdown from a remote system Take ownership of files or other objects Debug programs Modify firmware environment values Profile system performance Profile single process Increase scheduling priority Load and unload device drivers Create a pagefile Adjust memory quotas for a process Remove computer from docking station Perform volume maintenance tasks Impersonate a client after authentication Create global objects Enable computer and user accounts to be trusted for delegation Add workstations to domain
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.