Solaris Autofs with ldap / AD

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

I created a powershell script to create NisObjects for autopilot:

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 I am using 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 running 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 correct, but when I go to 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?

+3


source to share





All Articles