coLinux
Advertisement

<Gniarf> draft documentation. edit at will, refactor at will, copy and paste text as needed in other pages.


(in another page called 'high-level networking with coLinux', provide documentation to access Windows from co Linux, coLinux from Windows, using samba, ftp, www, whatever, once the network is up and running)


Using SMBFS

Note regarding Windows 2003:

smbfs works fine for most users, but the SMB protocol that smbfs supports is a bit dated and somewhat insecure.

Since smbfs was developed, Microsoft has updated the protocol to include some newer security features. The updated version is often called CIFS. Unfortunately, smbfs does not support some of the newer features of CIFS. Because of the security problems, many Windows 2003 servers are configured to refuse access to clients using the older protocol. Your mount will fail with an error such as "SMB signing is mandatory and we have disabled it." That means your Windows 2003 server is refusing to use the older protocol that smbfs supports. You will need to use the CIFS VFS kernel module. Good luck!

Assuming your Windows box is called THATBOX, that there is a user 'User' sharing a folder or drive called 'mysharedfolder', you can already access this folder from KDE konqueror (web navigator, file manager and info and man pages viewer) using this syntax :

smb://User@thatbox/mysharedfolder

next step : really mount windows shared directories as file systems so you can use shell commands, editors, and all. among other things, you can copy files from and to coLinux this way.


get smbfs (Samba file system) under Debian :

apt-get install smbfs
smbmount //THATBOX/mysharedfolder /mnt -o username=User,password=[[myTrickyPassword]]
ls /mnt

result :

 /dev/cobd0 on / type ext3 (rw,noatime)
 proc on /proc type proc (rw)
 devpts on /dev/pts type devpts (rw,gid=5,mode=620)
 tmpfs on /dev/shm type tmpfs (rw)
 //THATBOX/mysharedfolder on /mnt type smbfs (rw)

alternative syntax :

  • mount -t smbfs -o username=User,password=myTrickyPassword //THATBOX/mysharedfolder /mnt

Gentoo : the ability to mount samba drives is either already there by default in the Gentoo image, or installed when you emerge samba. don't know yet, but the same syntax for smbmount works fine.

Fedora :

apt-get install samba-client
mount -t smbfs -o username=foo,password=bar //host_name/dir /mnt
ls /mnt

N.B. : this is smbfs, not samba itself (not yet). you can also share coLinux directories and make them available under Windows, you would have to install samba to do that.


N.B. : you don't want to share your Windows drives to the world, do you ? using the appropriate security measures is necessary.


Another documentation for Samba / coLinux :

It's trivial to access windows drives from colinux.

colinux: mkdir C
colinux: mount -t smbfs -o username=Win32[[UserName]] //your-win2000-machine/C$ C
Password:
colinux: ls C
<contents of your C drive>
colinux:

To make this easier, simply add it to your /etc/fstab.

colinux: cat <<EOF >> /etc/fstab
> //your-win2000-machine/C$	/C	smbfs	noauto,username=Win32[[UserName]]
EOF
colinux:

To mount this drive, simply type the following, which will prompt for your password.

colinux: mount /C

If you value convenience over security, simply embed your password in /etc/fstab as follows:

cat <<EOF >> /etc/fstab
> //your-win2000-machine/C$	/C	smbfs	noauto,username=Win32[[UserName]],passwd=Win32Password

Alternatively, you can automatically mount the drive by removing the "noauto" option. In that case you will be prompted at system boot for the password if it is not supplied.

 ----

Secure Way

 Taking security into consideration, perhaps the best way to mount a drive automatically, is to reference a credentials file in /etc/fstab, e.g.:
  //your-win-machine/C$ /C smbfs credentials=/etc/smb-credentials 0 0
or better yet:
  //your-win-machine/C$ /C cifs credentials=/etc/smb-credentials 0 0
 This credentials file (/etc/smb-credentials) should be in the following format:
  username = _*username*_
  password = _*password*_
  domain = _*domain*_
 Make sure you issue: chmod 640 /etc/smb-credentials to block your windows passwords from being shown to users other than root.
 The domain line need not be included if it is specified in /etc/smb.conf. --bbeck
 changes by: JAM-ONE 2005-09-27
 ----

MassTranslated on 25 Dec 2004.


MassTranslated on Sun Apr 23 17:35:29 UTC 2006

Advertisement