[Samba] Home auto creation
Everton Cordeiro
cordeiroef at gmail.com
Sun Dec 21 15:22:56 MST 2014
At the institution where I work, we have created a GPO to create and mount
the directories persons from users, follows the script.
create the file name.vbs with the content
Option Explicit
Dim objNetwork, objShell, wshShell, wshell, strDesktop, oShellLink, user1,
FileClass, Directory
Dim strDriveLetter, strRemotePath, strUserName, strNewName
Set wshell = createobject("wscript.network")
user1 = wshell.username
Set FileClass = CreateObject("Scripting.FileSystemObject")
Directory = "\\server\usuarios\" & user1
If FileClass.FolderExists (Directory) = False Then
FileClass.CreateFolder (Directory)
End If
strDriveLetter = "N:"
strRemotePath = "\\server\usuarios"
strNewName = "Diretorio Pessoal"
Set objNetwork = WScript.CreateObject("WScript.Network")
strUserName = objNetwork.UserName
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath _
& "\" & strUserName
Set objShell = CreateObject("Shell.Application")
objShell.NameSpace(strDriveLetter).Self.Name = strNewName
Set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.specialfolders ("Desktop")
set oShellLink = WshShell.CreateShortcut (strDesktop & "\Diretorio
Pessoal.lnk")
oShellLink.targetPath = "N:"
oShellLink.Save
WScript.Quit
2014-12-21 17:58 GMT-02:00 jacek burghardt <jaceksburghardt at gmail.com>:
> I want to auto create home directories for users when they login for the
> first time . I need kerbos authentication is possible to set it up on same
> host as domain controller so ad users can take ownership of home folder
>
> --
> Join my framily E02705708hn 3032 last name BURGHARDT state is co
> Cheapest sprint service only 25 a month.
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba
>
More information about the samba
mailing list