Linux

Automatically connecting Linux workstations to your NetWare servers at startup

You know that you can connect Linux workstations to NetWare servers. In this Daily Feature, John Sheesley shows you how to make that connection happen when you first boot Linux.

In a previous Daily Drill Down, I showed you how to connect your Linux workstations to your NetWare servers. I also explained how to enable those Linux workstations to access files stored on your NetWare volumes using the ncpmount command. However, using ncpmount every time you reboot your workstation can be tedious. In this Daily Feature, I’ll show you how to automate the routine so your Linux workstations will connect to your NetWare servers as soon as you boot the workstations.

Only fools rush in
Don’t rush ahead with this Daily Feature unless you’ve already read the Daily Drill Down mentioned above and have everything you need to connect your Linux workstation to your NetWare network. Make sure you have a mount point ready for your NetWare volumes on the workstations and that you have IPX support installed. You may even want to do a test ncpmount from a command prompt before proceeding.
Be aware that in this Daily Feature, I’ll be explaining how to make a modification to one of Linux’s most important startup files. Make sure you have a Linux boot floppy before making any changes. If you don’t have one and you make a mistake while performing any of the tasks that I describe in this Daily Feature, you’ll turn your Linux workstation into a large paperweight. For more information about creating a Linux boot disk, see the Daily Feature “Creating Linux boot disks from both Linux and DOS.”


Making the connection
After you’ve verified that your Linux workstation can see with your NetWare servers using the slist command from your workstation’s command prompt, you’re ready to begin. You’ll need to either log onto your Linux workstation as root or drop to command line and switch to root using the su - command along with your root password.

At the command line of your Linux workstation, type cd /etc/rc.d and press [Enter]. You’ll notice that your command-line prompt will change to [root@workstation rc.d]#. When you see this prompt, type pico rc.local and press [Enter]. Doing so will start the Pico text editor and load the workstation’s rc.local file. The rc.local file is a script file that contains commands that you want to run after your workstation boots. At the top of the file, you’ll see several lines commented out with the pound symbol (#), which represents remarks. Immediately after the last commented line, press [Enter] once to create a blank line and type the ncpmount command you use to connect to your server.

For example, to connect to the server Brain with a default user ID of jsheesley, the command would be ncpmount /mnt/netware -S brain -U jsheesley. I suggest you leave the -P switch off of the ncpmount command. That way, when the workstation boots, ncpmount will ask you for your NetWare password. You can speed boot time by including the -P switch and adding the NetWare password for the user specified in the -U switch, but if you do, the password will be hard coded into your rc.local file and will compromise security on your NetWare server.

After you’ve entered the command, save the file by pressing [Ctrl]X and then pressing Y when Pico asks you if you want to save your changes. You’ll need to restart your Linux workstation for the change to take effect. When your workstation reboots, the last thing you should see before you have to log in to your Linux workstation is a password prompt for your NetWare server.

Conclusion
NetWare and Linux can get along really well once you learn the proper commands. However, Linux commands can sometimes be cumbersome to remember and tedious to constantly type in. Just remember that you can save yourself some typing by entering the ncpmount command in your Linux workstation’s rc.local file.
0 comments