LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 03-20-2013, 01:18 PM   #1
varouj
LQ Newbie
 
Registered: Oct 2012
Posts: 8

Rep: Reputation: Disabled
Samba4 - mapping Network Drives based on Group membership


Hi All

I have a problem running a logon script to map network drives based on Group Membership. The script is a VBScript that resides in the netlogon share. It Works just fine when the logged in user is a Domain Admin but fails to get the Group information when logged in as a regular user. For example when I login as administrator who is a member of every Group (For test only all the requested Drives are mapped. When I login as testuser1 who is a member of HR Group say, only a Public drive is mapped and nothing else.

This seems to be a permission issue querying Active Directory, and I have no idea on how to give users the permission to Query the AD in Samba4. Can anyone help?

for reference here is the VBScript I use:


On Error Resume Next

Set objSysInfo = CreateObject("ADSystemInfo")
Set objNetwork = CreateObject("Wscript.Network")

strUserPath = "LDAP://" & objSysInfo.UserName
Set objUser = GetObject(strUserPath)

objNetwork.MapNetworkDrive "Z:", "\\10.100.1.128\Public"

For Each strGroup in objUser.MemberOf
strGroupPath = "LDAP://" & strGroup
Set objGroup = GetObject(strGroupPath)
strGroupName = objGroup.CN




Select Case strGroupName
Case "HR"
objNetwork.MapNetworkDrive "N:", "\\10.100.1.128\HR"

Case "Engineering"
objNetwork.MapNetworkDrive "y:", "\\10.100.1.128\Engineering"

Case "Payroll"
objNetwork.MapNetworkDrive "M:", "\\10.100.1.128\Payroll"

Case "IT"
objNetwork.MapNetworkDrive "O:", "\\10.100.1.128\Data"
objNetwork.MapNetworkDrive "X:", "\\10.100.1.128\IT-APS"
End Select
Next


Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
centos directory server 8.1 password policy based on group membership tsandholm Linux - Server 1 11-07-2011 11:34 AM
Linux authentication with LDAP - select user's shell based on group membership slinx Linux - Software 4 08-02-2011 07:50 PM
home directories based on group membership freakyal Linux - Server 8 07-13-2011 12:22 AM
Mapping Network Drives in Suse 10.1 Robeasts Linux - Newbie 3 09-07-2006 01:31 PM
mapping network drives foliva SUSE / openSUSE 2 09-20-2005 02:02 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 05:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration