Running SAMBA on a Linux machine
To start, stop or restart samba,/etc/init.d/smd start /etc/init.d/smd stop /etc/init.d/smd restart
Notable changes I made are:
My linux machine is a gateway server with two ethernet interfaces eth0 and eth1. For security reasons I set up SAMBA to run only on the internal interface
interfaces = 192.168.0.1/24 127.0.0.1/24 bind interfaces only = Yes
hosts allow = 127. 192.168.0. hosts deny = *
SAMBA authentification
For the file access permissions for the shares to work, you have to set up the SAMBA username/password by running smbpasswd program on the linux box.Then on the Windows machine login with the username/password created above with smbpasswd. Otherwise the file sharing will not work.
SAMBA Linux to Windows Sharing
Set up the shares in /etc/samba/smb.conf as follows[musak] comment = music from linux boxen path = /var/stuff/media/musak read only = Yes
If you want to share CD/DVD drive
[dvd] comment = dvd drive on linux boxen writable = No locking = No path = /mnt/cdrom2
SAMBA Windows to Linux Sharing
First turn on file sharing. Go to Start->Setting->Control Panel and open "Network" and in the first tab called "Configuration" click on "File and Pring Sharing..." and om the Dialog Box that comes up check "I want to be able to give others access to my files"Now go to the file explorer and right click on the folder you want to sgare, and from the menu that pops up slect "Sharing..." and from the "Manual Properties" Dialog Box that comes up select the second tab "Sharing" and select "Shared as" which will enable all the text boxes, fill in the "Share Name" "Comments" and selct "Read Only" "Full" or "Depends on Password" and enter a password. This is the password that will give access to this share. Also note the "Share Name", lets name it "MYSHARE".
Also find out the hostname of the Windows machine. Go to Start->Setting->Control Panel and Open "Network" and in the second tab "Identification" note the "Computer Name", This is the name to use from Linux to access shares on this machine. Let it be "MYWINBOX"
Now go to the Linux machine. Crete mount point for the share.
mkdir /mnt/winstuff
smbmount \\MYWINBOX\MYSHARE /mnt/winstuff
0 komentar:
Post a Comment