How to Setup Samba With windows
Posted by kranny on June 6th, 2009;This post is viewed 2,812 times
There are many tutorials floating around, on the same topic.Though i never found a complete guide for a newbie to get through.So here we go
Requirements
–>You should have an static ip-address.If you’re getting your ip from a router/server via DHCP make sure it’s configured to provide a fixed dhcp-lease.
–>You need to have samba installed.
To install it ,open up a terminal and type
sudo apt-get install samba
stop the samba service with
sudo /etc/init.d/samba stop
Now we are going to tweak the smb.conf file rather using the useless default file.So back it up before doing anything
sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.backup
Download my smb.cnf onto your desktop and
cd Desktop
mv smb.cnf /etc/samba/
there are a few changes u need to make.open the smb.cnf file
sudo gedit /etc/samba/smb.cnf
netbios name = YOUR_HOSTNAME
Replace “YOUR_HOSTNAME” with your desired hostname (don’t use spaces!). Best pratice would be to use the same name you configured upon installation.
Example:
netbios name = JAUNTY
workgroup = YOUR_WORKGROUP
Replace “YOUR_WORKGROUP” with the name of your workgroup, but make sure you’re using the same as configured in Windows.
To find out the Workgroup name in Windows follow these steps:
Goto “START”–>Control Panel–>Click System
- Click the 2nd Tab entitled “Computername” and find the name of the Workgroup there.
Example:
workgroup = MSHOME
wins support = yes
If your box doesn’t have a static ip-address, or you cannot configure your router/server to provide you with a fixed dhcp-lease, change this configuration parameter to “no”.
In this case you cannot use the benefits of WINS.
[MyFiles]
This is the name of the share. Leave it as it is or adjust it to whatever you prefer. Don’t use more than 31 characters and try to avoid spaces!
path = /media/samba/
This suggests that you’ve mounted an hard drive or partition on /media/samba where all the shared files will be stored.
force user = YOUR_USERNAME
force group = YOUR_USERNAME
Replace “YOUR_USERNAME” with the name you use for login (no spaces!).
Now we completed the part of editing smb.conf.Save the file and close gedit.Since we are going to share the folder with other users we should now make sure that the permissions are set. Type:
sudo chmod 0777 /media/samba
start the samba server
sudo /etc/init.d/samba start
Add yourself as a user
sudo useradd -s /bin/true your_username
sudo smbpasswd -L -a your_username
sudo smbpasswd -L -e your_username
Netwrok setting in windows
Goto START–>My Computer
right click it and select “Map network drive”
- Choose the drive letter
- Type \\YOU_HOST_NAME\YOUR_SHARE_NAME
- Click “Finish”
There you are .You have a working Samba LAN workstation




(2 votes, average: 4.00 out of 5)