PDA

View Full Version : Knoppix Knewbie Kneeds help with Knetworking



larryd
01-14-2004, 12:00 AM
(Sorry for the subject line, I couldn't resist!)

I am new to Knoppix and was wondering if there was a simple tutorial or help section on setting up a simple home network. I currently have three XP Home machines networked.
If I run Knoppix from the CD, is there a way to set up the network so that each time I boot to Knoppix the network is set up, or would it need to be reestablished each time I boot.
Thanks!

arkaine23
01-14-2004, 12:10 AM
You could write a smbmount script to mount those network shares, save it in /home/knoppix/.kde/Autostart. You'd have to make a persistent home on a usb pen or a hard drive or install knoppix to your hard drive if you wanted it to save across a reboot.

larryd
01-14-2004, 12:16 AM
Huh?
Sorry, I should have added that I am an intermediate user (that is, I like the Windows Wizards!)
Can you point me in the direction of an easy to understand explanation (I haven't found it yet)
Thanks!

arkaine23
01-14-2004, 12:41 AM
Welcome to Linux!

samba is a service much like windows networking which allows linux to share its files out to windows. smbmount is a shell command used for mounting a windows or samba share from another computer. A script is a simple program.

For example:

#!/bin/sh
mkdir /mnt/share1
sudo smbmount //hostname/sharename /mnt/share1 -o username=remoteusername


Save something like that as a text file. For this example, I'll name the file sambascript.

Run this command on it:

chmod +x sambascript

^ That makes it executable.

Now this simple example will create a folder called /mnt/share1 in ramdisk. This folder will link to a windows share on another computer. In the example script hostname is the name of the windopws computer, sharename is the name of the share, and remoteusername is the name of the user to conenct as.

What I usually do to avoid any confusion is use knoppix as the remoteusername, and create a user called knoppix on the windows computer.

When this script runs it will prompt you for the password of the remoteusername- the password for that user on the windows box you're connecting to.


This is not a perfect example, just a simple one. There'd be some extra stuff in order to let both knoppix and root be able to access the share (only root can access the share in this example). Also, you'd want to script it so you did not have to enter a password when it runs, so it connects automatically.

This is really a workaround. Ordinarily on a Linux OS installed to a hard drive, you'd define remote shares you wanted to have mounted automatically in /etc/fstab.

mortalmatt
01-23-2004, 08:29 PM
hello,
after the smbmount is done of a windows share, can things be saved from knoppix such as common layout preferences or programs installed within knoppix ? would my knoppix cdrom need to be changed for this mount and the above to be done?
thank you
-matt

arkaine23
01-23-2004, 08:33 PM
You would need to remaster the CD or hd-install knoppix to make any permanent solution.

But you can run commands similar to the example above to mount one or several windows shares each time you boot knoppix.

Once mounted, yes you can save files to the windows share or copy them back inot your ramdisk. You can't use a network share for a persistent home without a lot of work though because knoppix builds its home directory before any networking services are started.

I made a script on my remaster (http://overclockix.octeams.com) called mountnetdrive which makes things a little easier.

just run as root:

mountnetdrive # $hostname $sharename knoppix

#= should be any single character- this is appened to the mountpoint
$hostname is the host to conenct to
$sharename is the name of the share

# is used to append to the mountpoint. The script will create /mnt/netdrive# each time you run it. So I usually use numbers 1, 2, 3, etc so that each time I use the script to mount a new share, I know it'll be mounted at /mnt/netdrive1, /mnt/netdrive2, etc.

mortalmatt
01-23-2004, 08:39 PM
thank you for your quick reply! , i see, i have a student network share here at school, and i wanted to use it in that fashion, to be able to save my settings and all that i do in knoppix

arkaine23
01-23-2004, 08:44 PM
It's very useful, especially to copy files off a dying hard drive onto another computer's hard drive- for instance on laptops. Also, because its running through samba, you can write to NTFS on a remote computer without any trouble.

I use it a lot for folding@home. I can keep my distributed computing clients on a machine that has a hard drive, and just mount the share from a diskless Knoppix machine and start my folding program from there.

mortalmatt
01-23-2004, 08:45 PM
hmm i like knoppix so far, will you help me in telling me how i may do what i mentioned in my last post? thanks alot

arkaine23
01-26-2004, 01:13 AM
smbmount //$hostname/$sharename /mnt/netdrive -o username=$username

Just change this command so that $hostname is the host you want to connect to, $sharename is the name of the share, and $username is the name of a user who can access the share.

To avoid confusion and permission problems I make a user called knoppix on the windows computer and set $username as knoppix when running the script.

You'll then be prompted for $username's password, and the share will be mounted to /mnt/netdrive.