3

Iv'e added my solaris server to Active Directory using LDAP, I am trying to use automounting from AD.

I have created a powershell script to create the NisObjects for automouting:

Import-Module ActiveDirectory

$basedn="ou=TEST,dc=test,dc=internal"
New-ADOrganizationalUnit -Name "autofs" -Path $basedn

New-ADObject -Name auto.master -Path "OU=autofs,$basedn" -Type nisMap -OtherAttributes @{'nisMapName'='auto.master'}
New-ADObject -Name /home -Path "CN=auto.master,OU=autofs,$basedn" -Type nisObject -OtherAttributes @{'nisMapName'='auto.master' ; 'nisMapEntry'='auto.home'}

New-ADObject -Name auto.home -Path "OU=autofs,$basedn" -Type nisMap -OtherAttributes @{'nisMapName'='auto.home'}
New-ADObject -Name test -Path "CN=auto.home,OU=autofs,$basedn" -Type nisObject -OtherAttributes @{'nisMapName'='auto.home'; 'nisMapEntry'='/root/test'}

Below is what I used on ldapclient

ldapclient mod \
-a "serviceSearchDescriptor=auto_home:cn=auto.home,ou=autofs,ou=TEST,dc=test,dc=internal" \
-a objectclassMap=automount:automountMap=nisMap \
-a objectclassMap=automount:automount=nisObject \
-a objectclassMap=auto_home:automount=nisObject \
-a attributeMap=automount:automountMapName=nisMapName \
-a attributeMap=automount:automountKey=cn \
-a attributeMap=automount:automountInformation=nisMapEntry \
-a attributeMap=auto_home:automountMapName=nisMapName \
-a attributeMap=auto_home:automountKey=cn \
-a attributeMap=auto_home:automountInformation=nisMapEntry

When doing a ldaplist ldaplist -l auto_home "*"

I get the following:

dn: automountKey=test,automountKey=auto.home,OU=autofs,OU=TEST,DC=test,DC=internal
    objectClass: top
    objectClass: automount
    automountKey: test
    distinguishedName: CN=test,CN=auto.home,OU=autofs,OU=TEST,DC=test,DC=internal
    instanceType: 4
    whenCreated: 20170714154438.0Z
    whenChanged: 20170714160835.0Z
    uSNCreated: 20750
    uSNChanged: 20826
    showInAdvancedViewOnly: TRUE
    name: test
    objectGUID:: AqPK14JbKkuwP3bR0ahsVw==
    objectCategory: CN=NisObject,CN=Schema,CN=Configuration,DC=test,DC=internal
    dSCorePropagationData: 16010101000000.0Z
    automountMapName: auto_home
    automountInformation: /root/test

This looks to be correct but when I go into the /home/test directory I get this in the logs:

Jul 14 16:09:25 SOL11-CLIENT automountd[4647]: [ID 734814 daemon.error] mapline_to_mapent: bad location= map=auto_home key=test
Jul 14 16:09:25 SOL11-CLIENT automountd[4647]: [ID 406441 daemon.error] parse_entry: mapentry parse error: map=auto_home key=test

Any ideas?

user2716281
  • 135
  • 10
  • Perhaps more likely to get answer if posted on [StackExchange for Unix/Linux](https://unix.stackexchange.com/) as your question is not really programming related, more like configuration. – peterh Aug 02 '17 at 19:42

0 Answers0