Terry : Use Samba

Use Samba

GUI in X Window System

GNOME + nautilas

1. Places - Connect to Server - Type Windows Share

2. nautilus open smb://hostname/Share and then input credentials

Command Line Interface

smbclient

See the share on a Windows box

smbclient -L <windows-box> -U <username>

Output

[terry@tux ~]$ smbclient -L 10.187.65.208 -U administrator
creating lame upcase table
creating lame lowcase table
params.c:OpenConfFile() - Unable to open configuration file "/etc/samba/smb.conf":
	No such file or directory
smbclient: Can't load /etc/samba/smb.conf - run testparm to debug it
Enter administrator's password:
Domain=[AUSYVMWARE01] OS=[Windows XP 3790 Service Pack 2] Server=[Windows XP 5.2]

	Sharename       Type      Comment
	---------       ----      -------
	IPC$            IPC       Remote IPC
	mac             Disk
session request to 10.187.65.208 failed (Called name not present)
session request to 10 failed (Called name not present)
Domain=[AUSYVMWARE01] OS=[Windows XP 3790 Service Pack 2] Server=[Windows XP 5.2]

	Server               Comment
	---------            -------

	Workgroup            Master
	---------            -------
[terry@tux ~]$

smbclient //hostname/share -U

[terry@tux ~]$ smbclient //10.187.65.208/mac -U administrator
creating lame upcase table
creating lame lowcase table
params.c:OpenConfFile() - Unable to open configuration file "/etc/samba/smb.conf":
	No such file or directory
smbclient: Can't load /etc/samba/smb.conf - run testparm to debug it
Enter administrator's password:
Domain=[AUSYVMWARE01] OS=[Windows XP 3790 Service Pack 2] Server=[Windows XP 5.2]
smb: \>

For more info:

smb: \> help

mount

mount the Samba (CIFS) share to a folder

mount -t cifs -o username=windowsuser,password=password //windowsserver/sharename /mnt/windowsshare

In old versions of kernel, it can still be samba. Check it by using:

cat /proc/filesystems

/etc/fstab

edit /etc/fstab, add

//windows/share /mnt/samba      cifs   username=username,password=password 0 0

bypass username and password

//windows/share /mnt/samba cifs
auto,gid=users,fmask=0664,dmask=0775,iocharset=utf-8, credentials=/etc/sambapasswords 0 0

/etc/sambapasswords

username=username
password=password