Blame README.ncpfs

Packit 8480eb
Packit 8480eb
Hi all,
Packit 8480eb
Packit 8480eb
Below is the contents of a mail from Mike Fleetwood which describes how
Packit 8480eb
he managed to get ncpfs to work with autofs. It's included verbatium.
Packit 8480eb
Packit 8480eb
I've applied the patch below and hope that this will help those who
Packit 8480eb
need to use ncpfs.
Packit 8480eb
Packit 8480eb
Ian
Packit 8480eb
Packit 8480eb
==================
Packit 8480eb
Packit 8480eb
Below is a very small fix to autofs to mount ncpfs.  It just removes 
Packit 8480eb
the exclusion preventing mount_generic from being used to mount ncpfs.
Packit 8480eb
Packit 8480eb
This fix worked for me on Suse 9.1 with kernel 2.6.5 and ncpfs 2.2.4 for 
Packit 8480eb
both autofs 3.1.7 and 4.0.0.  I suspect it will work almost anywhere 
Packit 8480eb
provided that all the required ncpfs mount options can be passed as -o 
Packit 8480eb
options to /bin/mount.  ncpmount(8) is very informative in this respect.
Packit 8480eb
Packit 8480eb
Patch:
Packit 8480eb
----8<--------8<----
Packit 8480eb
diff -urN autofs-4.0.0.orig/daemon/mount.c autofs-4.0.0/daemon/mount.c
Packit 8480eb
--- autofs-4.0.0.orig/daemon/mount.c    2003-09-10 15:27:41.000000000 +0100
Packit 8480eb
+++ autofs-4.0.0/daemon/mount.c 2004-08-05 10:36:51.813852608 +0100
Packit 8480eb
@@ -26,7 +26,7 @@
Packit 8480eb
Packit 8480eb
 /* These filesystems are known not to work with the "generic" module */
Packit 8480eb
 /* Note: starting with Samba 2.0.6, smbfs is handled generically.    */
Packit 8480eb
-static char *not_generic[] = { "nfs", "ncpfs", "userfs", "afs",
Packit 8480eb
+static char *not_generic[] = { "nfs", "userfs", "afs",
Packit 8480eb
                               "autofs", "changer", "bind", NULL };
Packit 8480eb
Packit 8480eb
 int do_mount(const char *root, const char *name, int name_len,
Packit 8480eb
----8<--------8<----
Packit 8480eb
Packit 8480eb
Searching this list's archive and googling found nothing useful so I am 
Packit 8480eb
including extra hints of how I worked out how to configure automounting of 
Packit 8480eb
ncpfs.  (The ncpfs options you require will very likely be different to 
Packit 8480eb
those shown here.  See ncpmount(8) for the possible options).
Packit 8480eb
Packit 8480eb
1) Get cmd line mounting working using ncpmount working first:
Packit 8480eb
      ncpmount -S novellservername -U username -A dnsname -V volname /mnt
Packit 8480eb
         (Enter Novell password for username when prompted)
Packit 8480eb
      umount /mnt
Packit 8480eb
Packit 8480eb
2) Switch to using /bin/mount with -o options:
Packit 8480eb
      mount -t ncpfs -o ipserver=dnsname,volume=volname,passwd=XXXXXX \
Packit 8480eb
         novellservername/username /mnt
Packit 8480eb
      umount /mnt
Packit 8480eb
   (Note that there are other ways of supplying a password to ncpmount
Packit 8480eb
   besides specifying it on the cmd line).
Packit 8480eb
Packit 8480eb
3) Use /etc/fstab entry to provide all the options to mount.
Packit 8480eb
   Add /etc/fstab entry like:
Packit 8480eb
      # Device                    Mount Dir   FS Type   Options                                         FSCK   Dump
Packit 8480eb
      novellservername/username   /mnt        ncpfs     ipserver=dnsname,volume=volname,passwd=XXXXXX   0      0
Packit 8480eb
Packit 8480eb
      mount /mnt
Packit 8480eb
      umount /mnt
Packit 8480eb
Packit 8480eb
4) Switch to using autofs.  Add /etc/auto.master entry:
Packit 8480eb
      # Mount Dir   Map File
Packit 8480eb
      /novell       /etc/auto.ncpfs
Packit 8480eb
Packit 8480eb
   Create /etc/auto.ncpfs as:
Packit 8480eb
      # Key   -Options                                                      Location
Packit 8480eb
      dir     -fstype=ncpfs,ipserver=dnsname,volume=volname,passwd=XXXXXX   :novellservername/username
Packit 8480eb
Packit 8480eb
   ls /novell/dir
Packit 8480eb
Packit 8480eb
Packit 8480eb
All the best,
Packit 8480eb
Mike
Packit 8480eb
-- 
Packit 8480eb
 __  __ _ _     ___    ____ _    ___  ___  _           ___  ___    _
Packit 8480eb
|  \/  (_| | _ / _ \  | ___| |  / _ \/ _ \| |_ _  _  _/   \/   \ _| |
Packit 8480eb
| |\/| | | |/ |  ___| | _| | |_|  __|  ___| __| \/ \/|  O |  O  / _ |
Packit 8480eb
|_|  |_|_|_|\_\\___|  |_|  |____\___|\___||____\_/^\_/\___/\___/\___|
Packit 8480eb
Packit 8480eb
_______________________________________________
Packit 8480eb
autofs mailing list
Packit 8480eb
autofs@linux.kernel.org
Packit 8480eb
http://linux.kernel.org/mailman/listinfo/autofs