------------------------------------------------------------------------------- Requirements RPMs ncpfs-2.2.4-1 Standard linux openldap (for "/usr/bin/ldapsearch" ) b64decode OR mmencode OR perl MIME::Base64 $decoded = decode_base64($string) The GUI (suse91 distribution) is NOT needed for this. rpm -e novelclient-0.90-4.suse91 Optional novelclient package Provides commands slpquery ncpwhoami ncplisttrees ncplist ------------------------------------------------------------------------------- Mount Staff Home Volume... PROBLEM: we can not discover the server and volume from the staff LDAP. Goal is to find the following information s777386 --> Username: .s777386.eng.sce.gc Server: ??? python2.itc.gu.edu.au 132.234.123.21 Volume: USERS5/sce/eng/s777386 s2128622 --> Username: .s2128622.its.iis.mg Server: ??? manes.itc.gu.edu.au 132.234.190.55 Volume: s1884317 (student) --> Username: .s1884317.users.Accounts.Na.COMMONUSE Server: 132.234.247.156 Volume: USERS1/na/a17/s1884317 anthony --> Tree: GU Scope: GUSCOPE Username: .anthony.ITS.IIS.NA Server: ELVIS "eurus-hme1" 132.234.249.24 H Drive: ARGOS/USERS/USERS/anthony Server: ARGOS argos.itc.gu.edu.au 132.234.208.1 Volume: USERS/USERS/anthony mkdir ~/H ncpmount -S ARGOS -A 132.234.208.1 -U .anthony.ITS.IIS.NA \ -V USERS/USERS/anthony ~/H Service Location Directory Agent: 132.234.190.2 Using slpquery from novelclient on source forge... slpquery 132.234.190.2 directory-agent/// service:directory-agent://132.234.190.2 SLP Scope=GUSCOPE slpquery 132.234.190.2 ndap.novell/GUSCOPE// service:ndap.novell:///Gc.COMMONUSE.GUCUSE. service:ndap.novell:///IIS.GU. ... slpquery 132.234.190.2 bindery.novell/GUSCOPE// service:bindery.novell:///ARIEL service:bindery.novell:///LUNA ... OpenSLP mail list http://sourceforge.net/mailarchive/forum.php?forum=openslp-users ncplisttrees -S 132.234.190.2 GU ncplist -S 132.234.190.2 Name: O=IIS nwbols -S 132.234.190.2 -U .anthony.ITS.IIS.NA -v TS@B1 8A090200 0077 1 40 255 MUTA 66800000 0004 0 40 255 ... nwboprops -S 132.234.190.2 -U .anthony.ITS.IIS.NA -o MUTA -t 0004 -v NET_ADDRESS 1 40 255 OPERATORS 3 31 255 nwbols -S 132.234.208.1 -U .anthony.ITS.IIS.NA -v ARGOS B3960000 0004 0 40 255 ARGOS 81A70100 023F 1 40 255 ... Command to look for... nwdslist ------------------------------------------------------------------------------- Mount Student Home Volume... First look up home info on the user (Fedora Linux) ldapsearch -x -h ldap-nis.griffith.edu.au -b o=commonuse \ uid=s1884317 ndsHomeDirectory result dn: cn=s1884317,ou=users,ou=Accounts,ou=Na,o=COMMONUSE ufn: s1884317, users, Accounts, Na, COMMONUSE ndsHomeDirectory: cn=LUNA_USERS1,ou=NCS,ou=Na,o=COMMONUSE#4#na\a17\s1884317 QUSTION: two homes???? Figure out... Login Name .s1884317.users.Accounts.Na.COMMONUSE Server_DN cn=LUNA_USERS1,ou=NCS,ou=Na,o=COMMONUSE Home Resource Path na/a17/s1884317 Server map to IP address... Look up home server for this host... ldapsearch -x -h ldap-nis.griffith.edu.au \ -b 'cn=LUNA_USERS1,ou=NCS,ou=Na,o=COMMONUSE' \ hostServer hostResourceName result hostServer: cn=LUNA_POOL1_SERVER,ou=NCS,ou=Na,o=COMMONUSE hostResourceName: USERS1 Look up 'networkAddress' ldapsearch -x -h ldap-nis.griffith.edu.au \ -b 'cn=LUNA_POOL1_SERVER,ou=NCS,ou=Na,o=COMMONUSE' \ -s base networkAddress result (either entry) networkAddress:: OCMCDITq95w= decode 8 byte network address (only last 4 bytes wanted) echo OCMCDITq95w= | b64decode | \ od -j 4 -t u1 | sed -n 's/ /./g;s/^........//p' result 132.234.247.156 In DNS this is... luna-pool1.itc.gu.edu.au Resouce Volume Name Using hostResourceName from above... USERS1 ------------------------------------------------------------------------------- Mount Home volume DIRECT ncpmount -S s1884317 -A 132.234.247.156 -V USERS1/na/a17/s1884317 \ -U .s1884317.users.Accounts.Na.COMMONUSE ~/H check mount | grep -i '^s1884317/' result S1884317/.S1884317.USERS.ACCOUNTS.NA.COMMONUSE \ on /home/anthony/H type ncpfs (rw,noexec,nosuid,nodev) ERRORS: ncpmount: Account disabled (0x89DC) in nds login ncpmount: Invalid password (-669) in nds login ncpmount: Password required (0x8706) in find_conn_spec You already have mounted server S1884317 as user .S1884317.USERS.ACCOUNTS.NA.COMMONUSE on mount point /home/anthony/H Check it is mounted mount | grep -i '^s1884317/' Result S1884317/.S1884317.USERS.ACCOUNTS.NA.COMMONUSE on /home/anthony/SYS type ncpfs (rw,noexec,nosuid,nodev) Once logged in... Check result (NOTE ncpwhoami lists ALL ncpfs mounts) ncpwhoami Result (tree, ??? volume GUCUSE LUNA3 USERS1 s1884317 anthony Errors failed:no ncp connections. ncpwhoami -f 1 ...login script... Finishup ncpumount ~/H rmdir ~/H ------------------------------------------------------------------------------- Mount both SYS and HOME Using information above... Volume (not needed for HOME only) Convert Server_DN to... LUNA_USERS1.NCS.Na.COMMONUSE Mount System Volume (password required) NOTE -S can be ANYTHING! mkdir ~/SYS ncpmount -S s1884317 -A 132.234.247.156 -V SYS \ -U .s1884317.users.Accounts.Na.COMMONUSE ~/SYS passwd: .... WARNING the above requires a TTY for password.... $SSH_ASKPASS "Password for Griffith Home Mount" | (setup pty) ..ncpmount.. ERRORS: ncpmount: Account disabled (0x89DC) in nds login ncpmount: Invalid password (-669) in nds login ncpmount: Password required (0x8706) in find_conn_spec You already have mounted server S1884317 as user .S1884317.USERS.ACCOUNTS.NA.COMMONUSE on mount point /home/anthony/SYS Check it is mounted mount | grep -i '^s1884317/' Result S1884317/.S1884317.USERS.ACCOUNTS.NA.COMMONUSE on /home/anthony/SYS type ncpfs (rw,noexec,nosuid,nodev) Check result (NOTE ncpwhoami lists ALL ncpfs mounts) ncpwhoami Result (tree, ??? volume GUCUSE LUNA3 SYS s1884317 anthony Errors failed:no ncp connections. Mount Home volume mkdir ~/H ncpmap -T GUCUSE -A 132.234.247.156 \ -V LUNA_USERS1.NCS.Na.COMMONUSE -R na/a17/s1884317 -E ~/H Check it is mounted mount | grep -i LUNA_POOL1_SERVER/s1884317 result LUNA_POOL1_SERVER/S1884317 on /home/anthony/H type ncpfs (rw,noexec,nosuid,nodev) ncpwhoami GUCUSE LUNA1 SYS s1884317 anthony GUCUSE LUNA1 USERS1 s1884317 anthony Finishup ncpumount ~/H ncpumount ~/SYS rmdir ~/H ~/SYS -------------------------------------------------------------------------------