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 :
-
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.
-
#!/bin/bash
-
-
# Setup directory structure
-
if [ ! -d ~/Novell ]; then
-
mkdir ~/Novell
-
chmod 700 ~/Novell
-
fi
-
-
if [ ! -d ~/Novell/data-drive ]; then
-
mkdir ~/Novell/data-drive
-
chmod 700 ~/Novell/data-drive
-
fi
-
-
if [ ! -d ~/Novell/appl-drive ]; then
-
mkdir ~/Novell/appl-drive
-
chmod 700 ~/Novell/appl-drive
-
fi
-
-
# Set UserName if none given fetch your current linux loginname
-
if [ -e $1 ]; then
-
echo $1
-
NDSUSER=$USER
-
else
-
NDSUSER=$1
-
fi
-
-
# Set alternative context
-
if [ ! -e $2]; then
-
CONTEXT=$2
-
else
-
CONTEXT=your.context.here
-
fi
-
-
# 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
Cheers,
Raymond.
Thanks for this really useful script – it naturally saved my life ))
I’ve tried logging in to my netware server 4. The npclogin software returns with a failed message.
failed:npclogin: inappropriate ioctl for device attempt to open mount point.
Then nothing works… mouse pointer still movable, but can’t click anything and anywhere.
I’m using 11.04
You could run the command “strace” followed by npclogin. That may give you some debugging information. Also found this link http://markmail.org/thread/llgmgr2jb5vbby4b Perhaps the same issue occurs using 11.04?
Good luck. If you find the solution I appreciate if you mention it here!
Raymond.