Wednesday, November 7, 2007

Samba - OMG it works.

Back in my FreeBSD days I tried hard to get samba working so my windows boxes could see and share files with the nix ones... ya I never got it working.... Today I have a better understanding of how samba works and I am able to setup shares without having to flip out, sweat like crazy and storm off in a fit to go smoke a cig.

On Ubuntu samba is installed as part of the default installation, All you have to do is point it to its shares (where you want to put and have windows see files) and setup a user account so you can access your shares.

1) System>Administration>Shared Folders
2) Click Add> Select the path > Share Name & Comment>Uncheck Read only (if you want to be able to write/delete from your windows pcs> Click Ok.
3) Under General Properties > Enter Correct domain/workgroup and click ok.

After you have selected your shares, in the terminal type:
sudo smbpasswd -a "username" (without the "s) to add a user account.

If you some how happen to forget you can remove and readd the user by doing this
sudo smbpasswd -x "username" then readd the user with the command above.

After you add the shares and user account you will need to start the samba daemon do it by entering this command:
sudo /etc/init.d/samba restart (at which point it will tell you that the daemon is restarting)
you should now be able to see and access your shares from windows or another samba capable linux or BSD machine.

Other useful samba commands are:

Start Daemon: sudo /etc/init.d/samba start
Stop Daemon: sudo /etc/init.d/samba stop

* Note that if you need to edit the smb.conf manually you can do it by entering this command:
sudo gedit /etc/samba/smb.conf

No comments:

Ubuntu Forums Content News