LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Access Shared Directories (https://www.linuxquestions.org/questions/linux-networking-3/access-shared-directories-170230/)

gotmonkey 04-14-2004 07:01 PM

Access Shared Directories
 
I am new to the forum and new to linux. I am trying to migrate from the evil empire. Here is my situation. My system is running Windows XP pro with dual booting Mandrake 10 Community. The other systems on the lan are running Windows XP pro. The installation went fine with Mandrake. All of my hardware seems to be working. My first task is to connect to the other systems in my house via the LAN. I installed SMB4K and LinNeighborhood to browse my network.

With LinNeighborhood:
I see my other systems & their shared directories. I was able to mount the shared drives and they show under the 'file:/home/monkey/mnt/'. I then created shortcuts on my desktop to those remote shares. When I restart my system, those shortcuts on the desktop and in the 'file:/home/monkey/mnt/' bring up empty windows. It is not until I launch linNeighborhood and it scans the network can I access those remote shares.

It is pretty much the same situation with SMB4k.

How can I set this up to automatically establish the connections to my remote shared system on the lan when the linux system is booted up?

I looked around the forum but haven't found an answer to this question.

:newbie:

Thanks

Thymox 04-14-2004 07:44 PM

Welcome to LQ.

The problem you're having is because of something called mounting. The way Linux accesses the remote (and local) filesystems is that they are mounted to a directory. For example, a cdrom's device may be /dev/hdc, but you'd access the files from the mountpoint of /mnt/cdrom. What you're doing with LinNeighborhood is you're mounting the remote shares onto a directory and reading them from there. In order to read the files again after you reboot, you'll need to remount the shares. As you have found, you can do this by re-running LinNeighborhood. You can also edit your /etc/fstab file to have them mounted automatically.

You would need to specify the remote share instead of the device name, and the filesystem would be smbfs. You might have something like:
Code:

//machine2/share /place/to/read/from smbfs username=USERNAME,password=PASSWORD,auto 0 0

gotmonkey 04-14-2004 09:35 PM

Thanks for getting back to me.
I think that I follow you. My secondary machine is named MONKEYBOY with a share of D-Shared. There is no password for the shared directories on the windows machine. I set it up as simple file sharing. I am behind a firewall at home.

does this look correct?

//MONKEYBOY/D-SHARED /home/monkey/mnt/MONKEYBOY/G/ smbfs username=minimonkey,password=,auto 0 0

Thanks for your help

gotmonkey 04-15-2004 08:10 AM

Well, I think that mostly worked. I mixed up two shares in the last post. When I rebooted, It mounted drives, but incorrectly. It was User Error.

Question: Do I need to state the username? The remote share is not password protected?

I should have wrote:
//MONKEYBOY/D-Shared /home/monkey/mnt/MONKEYBOY/D-Shared/ smbfs username=minimonkey,password=,auto 0 0

&

//MONKEYBOY/G /home/monkey/mnt/MONKEYBOY/G/ smbfs username=minimonkey,password=,auto 0 0

When I botched it the first time. I tried to correct it in /etc/fstab & it kept giving me errors to unmount and remove that connection. It kept giving me permission errors. I tried 'su' to root in konsole, but still wouldn't let me save the modified fstab file. I had to start a new session under root to make the change.

back later with update.

Thymox 04-15-2004 07:18 PM

Whether you need usernames or not depends on whether you have "share" set at the Windows end. To be honest, I've not set Windows shares too often from a Windows machine, so I don't know too much about setting it up that end. Basically though, if they are set to "share" with others without the need for a password, then it is highly unlikely that you'd need a password to read them through Linux/Samba.

gotmonkey 04-15-2004 09:20 PM

thanks for you help Thymox, it worked. once I edited fstab with the code. I created a shortcut on the desktop and it works.

:D


All times are GMT -5. The time now is 02:52 AM.