Ubuntu Hardy Heron – Novell Netware

update: also works on Intrepid Ibex!

Setup Novell client for a Ubuntu Heron workstation to connect to a Novell Netware Cluster.

First we need to install some additional software which you can find in the default repository :

  1. sudo apt-get install ncpfs

If you like you can find a complete file list here for what is installed:

  1. less /var/lib/dpkg/info/ncpfs.list

Command and tools:

  1. nw tools:
  2. nwauth      nwborm      nwbpset     nwfsctrl    nwmsg       nwpurge     nwtrustee
  3. nwbocreate  nwbpadd     nwbpvalues  nwfsinfo    nwpasswd    nwrevoke    nwtrustee2
  4. nwbols      nwbpcreate  nwdir       nwfstime    nwpjmv      nwrights    nwuserlist
  5. nwboprops   nwbprm      nwdpvalues  nwgrant     nwpqjob     nwsfind     nwvolinfo  
  6. ncplogin   ncplogout  ncpmap     ncpmount   ncpumount

All of the ncp* command you need root privileges. So when you map (sudo ncpmap) you can not access the files as a regular user! However, if change SUID bit for these files, you can. Take notice that this introduces a security risk!

  1. sudo chmod u+s /usr/bin/ncp*

So, what is the procedure to log-on and map drives to a Novell Netware Server? All of this is very trivial.

!! Change all variables between the [brackets] to your needs!

Step 1: Login to server

  1. sudo ncplogin -S [ServerName]  -A [Host]  -U .[UserName].add.your.context

You could add the ” -P ” flag and provide your password but you don’t want people to shoulder surf and snag your password! We have a cluster called atom, so my definition for both flags -S and -A is atom ;-)
!! Notice that we start which a ” . ” by flag -U

Step 2: Test if are connected:

  1. nwuserlist -S [ServerName
  2. ]

Step 3: Map the drives

  1. sudo ncpmap -S [ClusterResource] -A [ClusterResource] -V [VolumeName] -R [directory_to_map] ~/Novell/data-drive

As you can see I’ve logged-on to the Netware cluster and now I’m mapping to a cluster resource.

Step 4: Logout

  1. ncplogout -a

If you like, here is a little script I’m using to connect to the server:
Syntax ~/nwlogin [no username | username]
If no username is given then your linux username will be default.

  1. #!/bin/bash
  2.  
  3. # Setup directory structure
  4. if [ ! -d ~/Novell ]; then
  5.  mkdir ~/Novell
  6.  chmod 700 ~/Novell
  7. fi
  8.  
  9. if [ ! -d ~/Novell/data-drive ]; then
  10.  mkdir ~/Novell/data-drive
  11.  chmod 700 ~/Novell/data-drive
  12. fi
  13.  
  14. if [ ! -d ~/Novell/appl-drive ]; then
  15.  mkdir ~/Novell/appl-drive
  16.  chmod 700 ~/Novell/appl-drive
  17. fi
  18.  
  19. # Set UserName if none given fetch your current linux loginname
  20. if [ -e $1 ]; then
  21.  echo $1
  22.  NDSUSER=$USER
  23. else
  24.  NDSUSER=$1
  25. fi
  26.  
  27. # Set alternative context
  28. if [ ! -e $2]; then
  29.  CONTEXT=$2
  30. else
  31.  CONTEXT=your.context.here
  32. fi
  33.  
  34. # Close active connections
  35. ncplogout -a > /dev/null
  36. echo "Enter NDS password for $NDSUSER.$CONTEXT"
  37. read -s NDSPASS
  38.  
  39. ncplogin -S [ServerName] -A [Host] -U .$NDSUSER.$CONTEXT -P $NDSPASS -o tcp ||
  40. echo "Couldn't authenticate to NDS server, aborting…"
  41.  
  42. ncpmap -S [ServerResource] -A [ServerResource] -V [VolumeName] -R DriveToMap ~/Novell/data-drive || echo "Couldn't map to your atomdata, aborting…"
  43. ncpmap -S [ServerResource] -A [ServerResource] -V [VolumeName] -R DriveToMap ~/Novell/appl-drive || echo "Couldn't map to your atomappl, aborting…"
  44.  
  45. unset NDSPASS

Cheers,
Raymond.

Post to Twitter

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

1 Comment »

 
 

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

 

Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.