Greetings, 

Hi to all, 

I'm getting problems to migrate from NIS+Automount to LDAP+Automount;
Looks like the PADL tool doesn't generate the proper code, but code to
be used as a NIS map. 

This is the Redhat schema for automount,
/etc/openldap/schema/redhat/autofs.schema: 


# Depends upon core.schema and cosine.schema 

# OID Base is 1.3.6.1.4.1.2312.4 
# 
# Attribute types are under 1.3.6.1.4.1.2312.4.1 
# Object classes are under 1.3.6.1.4.1.2312.4.2 
# Syntaxes are under 1.3.6.1.4.1.2312.4.3 

# Attribute Type Definitions 

attributetype ( 1.3.6.1.1.1.1.25 NAME 'automountInformation' 
        DESC 'Information used by the autofs automounter' 
        EQUALITY caseExactIA5Match 
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 

objectclass ( 1.3.6.1.1.1.1.13 NAME 'automount' SUP top STRUCTURAL 
        DESC 'An entry in an automounter map' 
        MUST ( cn $ automountInformation ) 
        MAY ( description ) ) 

objectclass ( 1.3.6.1.4.1.2312.4.2.2 NAME 'automountMap' SUP top
STRUCTURAL 
        DESC 'An group of related automount objects' 
        MUST ( ou ) ) 


But if a run the migration tools (the one that comes with the Os are
exactly the same as the ones at the PADL site): i got the following: 

Auto.master: 

[root@lnxdev0002 MigrationTools]# perl migrate_automount.pl
/etc/auto.master 
dn: nisMapName=auto.master,dc=ZZZ,dc=YYYY,dc=XXX 
objectClass: top 
objectClass: nisMap 
nisMapName: auto.master 

dn: cn=/home,nisMapName=auto.master,dc=ZZZ,dc=YYYY,dc=XXX 
objectClass: nisObject 
cn: /home 
nisMapEntry: auto.home -rw,intr,rsize=4096,wsize=4096,acdirmin=40 
nisMapName: auto.master 

dn: cn=/nb_apps,nisMapName=auto.master,dc=ZZZ,dc=YYYY,dc=XXX 
objectClass: nisObject 
cn: /nb_apps 
nisMapEntry:   auto.nb_apps -rw,intr,rsize=4096,wsize=4096,acdirmin=40 
nisMapName: auto.master 

dn: cn=/data,nisMapName=auto.master,dc=ZZZ,dc=YYYY,dc=XXX 
objectClass: nisObject 
cn: /data 
nisMapEntry:   auto.data -rw,intr,rsize=4096,wsize=4096,acdirmin=40 
nisMapName: auto.master 

[root@lnxdev0002 MigrationTools]# 

Auto.home: 

[root@lnxdev0002 MigrationTools]# perl migrate_automount.pl
/etc/auto.home   
dn: nisMapName=auto.home,dc=ZZZ,dc=YYYY,dc=XXX 
objectClass: top 
objectClass: nisMap 
nisMapName: auto.home 

dn: cn=user1,nisMapName=auto.home,dc=ZZZ,dc=YYY,dc=XXX 
objectClass: nisObject 
cn: user1 
nisMapEntry: lnxdev0002:/export/home/& 
nisMapName: auto.home 

dn: cn=user2,nisMapName=auto.home,dc=ZZZ,dc=YYY,dc=XXX 
objectClass: nisObject 
cn: user2 
nisMapEntry: lnxdev0002:/export/home/& 
nisMapName: auto.home 


But according to the OpenLdap site
(http://www.openldap.org/faq/data/cache/599.html) the Schema in autofs
is broken and should work with something like this: 


The following example has been tested with autofs 4.0: 

dn: ou=auto.master, dc=example, dc=com 
objectClass: top 
objectClass: automountMap 
ou: auto.master 

dn: cn=/home, ou=auto.master, dc=ZZZ,dc=YYY,dc=XXX 
objectClass: automount 
cn: /home 
automountInformation: ldap
ldapserver.example.com:ou=auto.home,dc=ZZZ,dc=YYY,dc=XXX 

dn: ou=auto.home, dc=ZZZ,dc=YYY,dc=XXX 
objectClass: top 
objectClass: automountMap 
ou: auto.home 

dn: cn=user1, ou=auto.home, dc=example, dc=com 
objectClass: automount 
cn: user1 
automountInformation: -fstype=nfs,hard,intr,nodev,nosuid
nfsserver.example.com:/home/user1 

dn: cn=user2, ou=auto.home, dc=example, dc=com 
objectClass: automount 
cn: user2 
automountInformation: -fstype=nfs,hard,intr,nodev,nosuid
nfsserver.example.com:/home/user2 

I got several questions: 

1) I'm i wrong here? I would like to know also if i have to write a
script to do it myself or if there something out there i can use. 

2) I read also than there is no easy way to tell autofs to get the
auto.master from LDAP directly (just like autofs used to be with NIS)
but you need to "hack it" running a script or adding a ldap syntax
directly (http://www.openldap.org/faq/data/cache/599.html,
http://www.ccm.ece.vt.edu/~lscharf/samd/index.php?topic=LDAP).

Thanks in advance, 

JV. 




-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to