Get the samba version for your platform from here
Install samba on your linux box. It will be installed under /opt/samba by default.
Edit /etc/samba/smb.conf, and add the section for the directory you want to share to windows. For example, if you want to share your /opt/spike directory to windows, then you need to add the following section into /etc/samba/smb.conf
[spike] comment = Shared Files path = /opt/spike/ writeable = yes browseable = yes guest ok = no printable = no
Add samba password by using the following command:
$ smbpasswd -a <username> -- this adds a user and changes their password
Export you directory file-system. (For the above example, you can either export /opt or /opt/spike.)
Go to windows box, open "My Computer" --> "Tools" --> "Map Network Dirve...", then choose a dirve name (eg. e:/f:/g:/.../z:) and map to \\server\share (eg. \\gambia\spike)
Use the samba user you added in step 4 to connect to \\server\share.
/sbin/chkconfig --add smb to setup samba as a service.
Some useful Samba commands:
$ testparm /etc/samba/smb.conf -- check an smb.conf for internal correctness
$ smbclient -L //{netbios name of server}
-- "netbios name" gets defined in the gloal section of the smb.conf file.
Some simple diagnostic approaches for samba problem:
Check if can ping the linux machine from windows
Check if the the linux file system be exported
Check if smb service running.
Restart the smb server using /etc/init.d/smb stop and /etc/init.d/smb start
Try the above useful samba commands
Rerun "smbpasswd -a <username>" just in case the user was deleted.
A universal way: compare its configuration with other machine whose samba works properly.
I was wondering if you could help me. I do not know much about samba and a
friend set me up samba a long time ago. Anyways, one day i ran updates on
fedora and now it doesn't seem to start. I tried stopping and starting the
service but smb always fails and nmb starts and stops. I get "passdb expand
explicit = yes is deprecated" when i run the command to check the lines.
Was wondering how I might fix this problem?
I'm a linux newbie so I didn't know how to export the file system but I
found the solution here: