Search This Blog

Tuesday, August 5, 2008

Learning Samba \ First view

What is Samba?

Samba is software that can be run on a platform other than Microsoft Windows, for example, UNIX, Linux, IBM System 390, OpenVMS? , and other operating systems. Samba uses the TCP/IP protocol that is installed on the host server. When correctly configured, it allows that host to interact with a Microsoft Windows client or server as if it is a Windows file and print server.

How to use Samba

- Install Samba as described in

- Update the /etc/samba/smba.conf to expose the Linux files and directories to Windows eg:

browseable = yes
comment = < ... >
create mask = 0777
directory mask = 0777
path = /path/to/directory/folder/in/Linux
writable = yes
inherit acls = yes
valid users =

In this example the directory in Linux will be exposed as foo in windows, it is writable, will inherit access controls and only users specfied will be able to access the dir from a Windows client. The in valid users must exist in Linux.

- To create a samba password for the valid user, use

$smbpasswd -a 
This will encrypt the password and store in /etc/samba/smbpasswd file

- To start samba /etc/init.d/smb start or /etc/init.d/smb restart

- To stop samba /etc/init.d/smb stop

From Windows Explorer Typing in the IP address of the linux PC should enable Windows to see the [foo] dir in Microsoft Windows Network

-- JyotirmoySharma - 06 Sep 2007


Kunal Modi said...

Hey Mihir,
That was sleak !
I wanted to know if you have any clue on how to change Samba password using the Windows Client.

Mihir said...

No mate, I don't know how to do that.. Update me on that if you have already found a solution.

- Mihir Patel.