Posts Tagged ‘NetWare’

NetWare Physical to Virtual Migration

Thursday, January 1st, 2009

Worthy of a note is a process which can easily migrate a physical Novell NetWare eDirectory environment to a virtual one. The process first backs up the eDirectory on the physical machine, copies the backup files created to a workstatio, then powers down the NetWare server.

A virtual NetWare server of the same name and IP address is then powered up, the eDirectory backup files copied up to it, and an undocumented recovery option used to restore eDirectory. Great! Here’s the link: http://communities.vmware.com/thread/126991

Apache on NetWare6 - SOMFS1 Media Server

Friday, January 4th, 2008

Overview

Our Dell Poweredge 2850 Novell NetWare 6.0 server in Languages runs the Apache NLM. This has been reconfigured to serve audio-video files from volume \somfs1_media:AV_Media without providing a directory listing to prevent folder browsing.

The idea is that this server will serve the AV files, but that the URl to any file will be visible only to staff using a separate web server. This permit staff to preview a file, copy the link (URL) butdisallows students from browsing files which staff don’t wish them to have access to, perhaps for viewing later in the term.

In what follows, drive M: maps to Novell volume \somfs1_media.

Technical

Under \somfs1_sys: one finds the Apache folder, and in here we have the NCF files to start and stop Apache:

  • apachestart.ncf
  • apachestop.ncf

which may be run from the System Console (using Afreecon.nlm, for example, installable from N:admininstallAdRem Free Remote Console 5.0 where N: maps to \SOMFS2).

We also have httpd.conf with relevant lines:

DocumentRoot "media:/AV_Media"

<Directory "media:/AV_Media">
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</directory>

and a simple index.html page was written to notify users that browsing the folder structure was not permissable. We want to DNS register this instance of Apache as media.sml.hw.ac.uk (137.194.94.25 - which also matches somfs1.lan.hw.ac.uk) and open up the web server to global access on port 80. (Requested of UICS Jan 04 2008).

Protecting the Service

Finally, NDS container objects som.staff.hw and staff.lan.hw were granted [R F] access to index.html, index.php and the images folder underneath M:AV_Media to protect against accidental deletion.

Summary

  1. Novell NetWare 6.0 Server SOMFS1, a Dell Poweredge 2850, now runs Apache as http://media.sml.hw.ac.uk, served from \SOMFS1_Media:AV_Media
  2. Only basic HTML is supported - no PHP support nor Perl nor CGI of any kind is configured, for security.

Novell - SyncCentre slight reconfiguration

Wednesday, July 11th, 2007

Overview:

SyncCentre is an NLM which runs on SOMFS2 (Management Building) and synchronises Novell volumes with a mirror copy on SOMFS1 (Languages Building). See http://www.sml.hw.ac.uk:8080/serendipity/index.php?/archives/69-Novell-Synchronisation-of-SML-Novell-Servers-as-backup.html

It is managed by means of a GUI (Syncschedule) which creates a cfg file (\somfs2sys:systemsync.cfg). This CFG is read by an NLM loaded on SOMFS2 with it’s own (intuitive) console screen.

Change:

Following the IP number change of SOMFS1 from 95.1 to 94.25 (as a new subnet was created) the sync mechanism no longer worked, naturally. However, following a restart of the target server SOMFS1 with the correct, new IP credentials the sync mechanism still failed to work.

Resolution:

It was required in the GUI above to rename the source and target file servers with their FQDNs and then the schedule started working again.

Linux - Suse 10.1: Mounting NetWare folders

Monday, July 2nd, 2007

Scenario:

  • One would like to be able to mount NetWare volumes or folders under Suse Linux 10.1.
  • The scenario is of a single user on a Suse 10.1 machine who wishes to mount NSS volumes on a Novell NetWare 6.0 file server on which they have a regular login (eDir). The Suse environment is KDE 3.5.1 and the Novel server communications are IP only (no IPX).
  • The Novell server in question is referred to as SOMFS2 but has FQDN somfs2.som.hw.ac.uk and the Suse machine is suse01 (.hw.ac.uk). The Novell user account mentioned (somdjp) is in eDir/NDS context .som.staff.hw
  • All testing was performed using VMware Workstation 6.0

References:

  1. A good page with discussion and lot of links to this subject is here.
    • Options: Use ncpfs
    • Novell have their own Client for Suse Linux 10 here .
  2. Good website entitled /etc/fstab demystified

The Novell Client seems excellent for regular Linux desktop users, but a lighter solution is sought here.

NCPFS

The path chosen first was to install ncpfs.

  1. Using Yast, install the ncpfs package (NetWare Core Protocol File System) - download site http://freshmeat.net/projects/ncpfs/
  2. Novell Cool Solutions: "HOWTO: Mount Netware Servers in Linux Through /etc/fstab" [Ref]
    • Using Yast, package ncpfs was installed.
    • > mkdir /mnt/somfs2 [as root, to create the mount point]
    • > groupadd nwaccess [group to whom NetWare access is granted]
    • > usermod -G nwaccess somdjp [add the user somdjp to the nwaccess group]
    • > cd /mnt/somfs2
    • > chgrp nwaccess . [Important - see here for why.]
  3. Edit /etc/fstab to include the last line shown here in blue (followed by a blank line):
    • /dev/sda2 / reiserfs acl,user_xattr 1 1
      /dev/sda1 swap swap defaults 0 0
      proc /proc proc defaults 0 0
      sysfs /sys sysfs noauto 0 0
      debugfs /sys/kernel/debug debugfs noauto 0 0
      usbfs /proc/bus/usb usbfs noauto 0 0
      devpts /dev/pts devpts mode=0620,gid=5 0 0
      /dev/fd0 /media/floppy auto noauto,user,sync 0 0

      somfs2.som.hw.ac.uk/somdjp.som.staff.hw /mnt/somfs2 ncp uid=somdjp,gid=nwaccess,mode=660,owner=somdjp,A=somfs2.som.hw.ac.uk,passwdfile=/etc/ncp-pass 0 0
  4. Mount the NetWare volumes via
    • > su [must change to root to use mount command]
    • > mount -a -t ncp [password is read from /etc/ncp-mount]
    • > ls /mnt/somfs2 [all Novell SOMFS2 volumes appear under here!]
  5. The /etc/ncp-pass file must be manually created and have the format
    • somfs2.som.hw.ac.uk/somdjp.som.staff.hw:mypassword
      namely FQDN of host/FQ Login name of user:password
    • Permissions on /etc/ncp-pass are -rw——- root root (so only root can access this file).
    • Update: This was later changed so that user somdjp was the owner, and the group was set as nwaccess.
  6. Dismount NetWare volumes via
    • > umount -a -t ncpfs [note the last word is not ncp but ncpfs.]
  7. [NB: This next part didn't work for me.]
    If non-root users are to use the mount command, one must SetUseridRoot the Mount command (see here on a related IPX mount-related web page which has some good information on mounting NetWare volumes). One would change the permissions on the mount command via
    • > whereis mount [answer is /bin/mount]
    • > chown root:nwaccess /bin/mount
    • > chmod 755 mount [owner (root) has twx, group (nwaccess) has rx, other has rx]

    Alas, this didn’t work. Issuing the correct mount -a -t ncp command as a non-root user produces no result. Perhaps the /etc/ncp-pass file permission/ownership are at issue?
    Change owner to the non-root user who wishes to mount the volume:

    • >chown somdjp /etc/ncp-pass
    • >chmod 750 /etc/ncp-pass [owner=r,w,x,group=r,x]
  8. The above didn’t work either. The solution is to use the sudo command.
  9. Sudo allows one to run selected commands with root (or other user) privileges. It is configured by means of the visudo command. Usage: As root, configure sudo by running
    • > visudo
  10. This starts the microemacs text editor to edit the /etc/sudoers file, which it creates if not present. Note that one should set the EDITOR environment variable or vi will start. Do this by editing /root/.bashrc and adding the line
    export EDITOR=ue
  11. So, back in the visudo environment, enter the following text:
    • %users suse01 = NOPASSWD: binmount -a -t ncp, sbinmount -a -t ncp, binumount -a -t ncpfs
  12. This will allow all users of machine suse01 to use the mount/umount commands with the specified parameters, required to handle mounting of Novell volumes. For the user (somdjp) to mount the volumes he must run
    • > sudo mount -a -t ncp
  13. To dismount volumes, one can run (as root) either of these commands:
    • > umount -a -t ncpfs
    • > umount /mnt/somfs2 [where the latter is the mount point]
      Note that using only the first command sometimes resulted in a ‘file system is busy’ warning message but using the second one always worked. Also, one could run the sync command to flush the file system buffers before dismounting.
  14. It would be convenient to provide a desktop shortcut to a script which would do the mounting and dismountig, and this is covered next.

Scripting: Mounting the Novell Folders with help from kdialog

So, we can mount the NetWare folders as root, from a command shell by the above mount command.

We could script this and create a simpler bash shell script to do this to avoid remembering the mount syntax. Wouldn’t it be nice, also, to have a KDE desktop shortcut from which we could run this BASH script, which need only prompt for the ROOT password to run the mount command? The solution is using kdialog which will provide a dialogue to the user (as the name suggests.)

References: Shell scripting with KDE Dialog , Kdialog Dialog Types ,

Usage: Refer to the above for further details. The script requires to request the user for the ROOT password, so one would use the examples in the links above to:

  1. In the user’s home folder, create a bash script with microemacs (for example) named, for simplicity, novell_mount.sh
    • > ue novell_mount.sh&
  2. The bash script is as follows:
    #!bin/bash
    # Define the home folder of user on Novell server.
    VOL=/mnt/somfs2/somfs2/users2/somdjp

    # Tell the user what’s happening:
    kdialog –title "Novell Folder Mounting" –passivepopup "Mounting SOMFS2 Volumes …" 1

    if [ -d $VOL ]
    then
    kdialog –title "Novell Folder Mounting" –msgbox "It’s ok!nNovell Volumes are already available, dude, under $VOL ."
    exit
    else
    # Mount the volume using sudo (edit with visudo command)
    sudo mount -a -t ncp
    fi

    # Now test if home folder has mounted
    if [ -d $VOL ]
    then
    kdialog –title "Novell Folder Mounting" –passivepopup "Novell Volumes Mounted under $VOL." 2
    else
    kdialog –title "Novell Folder Mounting" –msgbox "Novell Volumes did NOT mount.n Oh dear. Try again."

    fi
    exit

  3. To make the script executable one must of course type
    • > chmod u+x novell_mount.sh
  4. And to run the script from a command shell one would type
    • > . novell_mount.sh
  5. One can easily create a KDE desktop shortcut to this script, as long as the command parameter is
    • /bin/bash -i /home/<user>/novell_mount.sh
    • One needs also click Properties-Application-Advanced and select the "Run in Terminal" option or a bouncing ball appears for a good few seconds after the script/shortcut has run. This indicates the application times out, or does not close properly.
    • The "Terminal Options" are the KDE Konsole Options, listed here.
    • The Terminal options chosen were –vt_sz 2×1 –nomenubar –noscrollbar -T Info
  6. To create a dismount script, open microemacs (or any editor) and create the following under script novell_umount.sh:
    #!bin/bash
    # Define the home folder of user on the Novell server:
    VOL=/mnt/somfs2/somfs2/users2/somdjp

    # Tell the user what’s happening:
    kdialog –title "Novell Folder Mounting" –passivepopup "Dismounting SOMFS2 Volumes …" 1

    if [ ! -d $VOL ]
    then
    kdialog –title "Novell Folder Dismounting" –msgbox "It’s ok!nNovell Volumes are not mounted."
    exit
    else
    # Flush any caches to disk
    sudo sync

    # Dismount by mount name
    sudo /bin/umount /mnt/somfs2

    # Dismount the volume type using sudo (edit with visudo command)
    sudo /bin/umount -a -t ncpfs
    fi

    # Now test if home folder has dismounted
    if [ ! -d $VOL ]
    then
    kdialog –title "Novell Folder Dismounting" –passivepopup "Novell Volumes Dismounted." 2
    else
    kdialog –title "Novell Folder Dismounting" –msgbox "Novell Volumes did NOT dismount.n Oh dear. Try again."

    fi

    exit

  7. Again, create a KDE shortcut to this script and ensure it is executable, as above. Note that
    • A few more sudo commands have been added, for which visudo must be run, and the following line must be present in /etc/sudoers as a result:
    • %users suse01 = NOPASSWD: /bin/sync, /bin/mount -a -t ncp, /sbin/mount -a -t ncp, /bin/umount /mnt/somfs2, /bin/umount -a -t ncpfs
    • In the discount script, both ways of dismounting were required to ensure the volumes are dismounted. At this stage, I’m unsure why this should be. Volume dismount isn’t actually critical for single-user Linux machines.

Initial Error when running Kdialog

An error message was generated initially when using kdialog, stating "failed to open file /usr/lib/qt3/etc/settings/qtrc". A web-search revealed this was because the above file (qtrc) was readable only by root. The error was resolved by chmod a+x the above file (as root).

Mounting at Boot time: Issues

The Novell volumes are not mounted at boot time, as the network service has not started at the time /etc/fstab is being read and disks/volumes mounted. This isn’t a problem in the scenario here and is further discussed in the NetWare Cool Solutions "Automatically Mounting Remote NCP (NetWare) Shares on SUSE Linux System Boot" [Ref]
which goes into more detail and discusses Samba solutions too. Samba
would mount the volume in a case-insensitive way, suitable for the
documentroot of an Apache webserver.

The Novell article above states:

The Problem:

Many users want to have remote NCP shares mounted on their SUSE Linux machine on system boot. The ncpmount (8) man page explains that to mount a NetWare share on system boot one simply needs to add the share to /etc/fstab. They do this, but the NCP shares are not mounted on system boot.

The Cause

The cause of this problem is simple: the system is attempting to
mount the NCP shares prior to starting the networking. This obviously
fails. After the system has boot, the user can execute mount -at ncpfs as root and have the shares mounted fine

The Solution

The most simple solution is to check whether the server hosting the
NCP share supports Native File Access for SMB/CIFS. If so, the share
can be mounted via Samba. Samba has scripts which mount the shares after networking has been started. These shares can be added to either /etc/fstab or /etc/samba/smbfstab.

So, the best way is to mount the Novell volumes as Samba shares - which would also be case-insensitive and thus suitable for being mounted as the Apache htdocs folder.

Addendum: An article on Linux Clustering advises:

"Next, edit /etc/fstab to make the server mount automatically when rebooting. When doing this, make sure that the file system has the option _netdev added in the options column. This option ensures that the file system is mounted only after the network has been enabled."

Adding the parameter _netdev to /etc/fstab and rebooting caused Suse to boot into command-line mode only, requesting a username and password. Loading microemacs from the command-prompt (ue) and commenting out the whole line by prepending a # symbol at the start resolved the problem.

Later, this was changed back to the line being active (comment removed) but the password file option is removed and replaced by option noauto. This allows the user (in this case somdjp) to manually mount the Novell folders from a command shell, if desired, but they won’t be auto-mounted at system boot time. However, the NetWare folders were no longer mounted for some unknown reason (using >mount -a -t tcp). Solution: put it back to the way it was before it got broken :o)

Using ncpmount

It’s also possible to mount Novell volumes using the ncpmount command that comes as part of the ncpfs package. Initial steps in testing this are as follows:

  1. In a command shell, change to root (su)
  2. Make sure the mount point exists (e.g. /mnt/somfs2)
  3. Issue the command
    • >ncpmount -S somfs2 -A somfs2.som.hw.ac.uk -U somdjp.som.staff.hw /mnt/somfs2

    whereupon a password will be prompted for and the Novell volumes mount.

  4. There are many options available (see the hyperlink to ncpmount above). Some of these can store the password in a file, for instance.
  5. To dismount the volumes one can issue
    • >ncpumount -S somfs2

Note that the normal Linux user (e.g. somdjp) does not have permissions to view the volumes (only root does) when the above command is issued. The remedy is to use the -u and -g flags which specify the default file owner (via uid) and group id of the mounted volumes. These can be determined easily by running

  • > cat /etc/passwd [obtain the uid and gid of the user for whom access is required]
  • > ncpmount -S somfs2 -A somfs2.som.hw.ac.uk -U somdjp.som.staff.hw -u 1002 -g 100 /mnt/somfs2

This time the regular Linux user with uid 1002 can browse their Novell files - and long filenames are supported.

Samba

Documentation

Novell and Network Monitoring

Tuesday, January 30th, 2007

It would be beneficial to monitor School Novell servers and alert IT Support staff - by SMS message to a mobile phone - in the event of a problem being detected.

Novell Cool Solutions lists Nagios software for this purpose. See also Nagios Home Page.

"Nagios is a host and service monitor designed to inform you of
network problems before your clients, end-users or managers do. It has
been designed to run under the Linux operating system, but works fine
under most *NIX variants as well.

The monitoring daemon runs
intermittent checks on hosts and services you specify using
external"plugins" which return status information to Nagios. When
problems are encountered, the daemon can send notifications out to
administrative contacts in a variety of different ways (email, instant
message, SMS, etc.). Current status information, historical logs, and
reports can all be accessed via a Web browser."

Other possibilities include Mutiny Network Monitoring software (homepage).

September 2010
M T W T F S S
« Feb    
 12345
6789101112
13141516171819
20212223242526
27282930  

Copyright © 2010 Duncansapien’s Techblog. Search Engine Optimization by Star Nine. Distributed by Wordpress Themes