# Connecting to Windows from Gentoo & vice versa [SOLVED]

## audiodef

I'm sure this is discussed elsewhere in these forums, but searching for it hasn't brought anything to the surface, so I apologize if this is redundant.

How do I open a shared folder in my Windows computer from my Gentoo computer? Everything is set up for sharing in the Windows folder and I'm able to map it as a network drive from another Windows computer. I just want to do the same thing in my Gentoo computer.

----------

## poly_poly-man

http://gentoo-wiki.com/HOWTO_Setup_Samba

should be a starting point - basically look for samba documentation.

poly-p man

----------

## bunder

 *poly_poly-man wrote:*   

> http://gentoo-wiki.com/HOWTO_Setup_Samba
> 
> should be a starting point - basically look for samba documentation.
> 
> poly-p man

 

from what i understand you don't need to configure samba or anything (samba is only for hosting shares, or logging onto a windows domain controller)... just install it and use mount...  and enable CIFS support in the kernel.

----------

## cyblord

 *bunder wrote:*   

>  *poly_poly-man wrote:*   http://gentoo-wiki.com/HOWTO_Setup_Samba
> 
> should be a starting point - basically look for samba documentation.
> 
> poly-p man 
> ...

 

Mounting seemed to work fine for me before.

----------

## audiodef

I read the man mount page, but I'm not sure I found what I need. If my network drive is at 192.168.1.100 (I'm assuming the filesystem type is ntfs for Windows XP), the shared folder is called "Muzedox" and I have a local dir called "win" I want to mount it in, what is the command I should use to mount this network folder?

----------

## desultory

If the name of the mounting user is usable to mounting shares from the remote machine and entering a password at a prompt is acceptable, mount -t cifs //192.168.1.100/Muzedox win should suffice.

Note that NTFS is a media based file system type whereas the files are being accessed via a network without the use of network block devices, in this case using CIFS.

----------

## audiodef

Thanks, desultory!

The first time I tried it, I got an unknown fs error, so I compiled CIFS into the kernel. The second time I tried it, I got 

```

CIFS VFS: cifs_mount failed w/return code = -22

```

I looked it up and found http://gentoo-wiki.com/HOWTO_Setup_Samba, which mentioned the need to emerge mount-cifs, which I did. After that, the mount command worked. 

Thanks for everyone's help!

----------

## audiodef

I just set up a new system. I have CIFS built into the kernel, but 

```

mount -t cifs //192.168.1.100/(dir) (mountpoint)

```

doesn't work. I get

```

mount: wrong fs type, bad option, bad superblock on //192.168.1.100/Muzedox,

       missing codepage or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

```

when I try that command.

I installed this system using 2008 beta and am running KDE. 

Did I miss something?

----------

## desultory

Perhaps the appropriate code page, probably the output of dmesg | tail.

----------

## SeaTiger

Make sure you ave the sambe package installed.

```
emerge samba
```

Then try

```
smbmount //192.168.1.100/(dir) (mountpoint) -o user=window_username
```

Then it will ask for your window_user password.

----------

## obrut<-

as stated above, it's not necessary to have samba installed as long you have net-fs/mount-cifs installed, cifs support and the appropiate codepage in your kernel. you can find it under file systems --> native language support in kernel configprog.

----------

## audiodef

Thanks, junksiu and obrut.

I needed to emerge samba and mount-cifs.

----------

## audiodef

I thought I'd post here instead of creating a new thread, since it's the same issue reversed. 

I need to connect to my Gentoo box from a Windows machine. I have Samba installed and started (including winbind), and have tried some basic configurations of smb.conf. I can now get my windows machine to prompt me for a password when I map network drive to \\192.168.1.100\(username), but nothing happens. Every time I submit my username and password the password box pops right back up. I tried setting a share like [share1] path=(wherever) but that didn't help. 

I also have SWAT set up and running, but I can't access it because this also asks for a username and password, and will accept neither root nor a regular user as valid credentials. 

Stump the chump day! I didn't come running here without doing some reading, so I would appreciate any help.

----------

## audiodef

Solved by yours truly!

smbpasswd -a root to set the root password for SWAT. 

Messed around with SWAT for a bit, continued to have the same problem mapping the network drive. On a hunch, I did smbpasswd -a (username) and presto! I'm in. The documentation was not very clear on that part.

----------

