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 :
- sudo apt-get install ncpfs
If you like you can find a complete file list here for what is installed:
- less /var/lib/dpkg/info/ncpfs.list
Command and tools:
- nw tools:
- nwauth nwborm nwbpset nwfsctrl nwmsg nwpurge nwtrustee
- nwbocreate nwbpadd nwbpvalues nwfsinfo nwpasswd nwrevoke nwtrustee2
- nwbols nwbpcreate nwdir nwfstime nwpjmv nwrights nwuserlist
- nwboprops nwbprm nwdpvalues nwgrant nwpqjob nwsfind nwvolinfo
- 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!
- 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
- 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:
- nwuserlist -S [ServerName
Step 3: Map the drives
- 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
- 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.
- # Setup directory structure
- if [ ! -d ~/Novell ]; then
- mkdir ~/Novell
- chmod 700 ~/Novell
- if [ ! -d ~/Novell/data-drive ]; then
- mkdir ~/Novell/data-drive
- chmod 700 ~/Novell/data-drive
- if [ ! -d ~/Novell/appl-drive ]; then
- mkdir ~/Novell/appl-drive
- chmod 700 ~/Novell/appl-drive
- # Set UserName if none given fetch your current linux loginname
- if [ -e $1 ]; then
- echo $1
- # Set alternative context
- if [ ! -e $2]; then
- # Close active connections
- ncplogout -a > /dev/null
- echo "Enter NDS password for $NDSUSER.$CONTEXT"
- read -s NDSPASS
- ncplogin -S [ServerName] -A [Host] -U .$NDSUSER.$CONTEXT -P $NDSPASS -o tcp ||
- echo "Couldn't authenticate to NDS server, aborting…"
- ncpmap -S [ServerResource] -A [ServerResource] -V [VolumeName] -R DriveToMap ~/Novell/data-drive || echo "Couldn't map to your atomdata, aborting…"
- ncpmap -S [ServerResource] -A [ServerResource] -V [VolumeName] -R DriveToMap ~/Novell/appl-drive || echo "Couldn't map to your atomappl, aborting…"
- unset NDSPASS