Laboratorium Komputerowe Progmar
Marcin Załęczny

We are using cookies in the page. If you use the page you agree for the cookies.      Close

Samba installation and configuration

To install samba server execute following command: sudo apt-get install samba samba-doc smbfs winbind

Now you have to configure samba shares. Below is an example of how to add sample www share:

    [www]
        path = /var/www
        coment = Webserver root
        writeable = Yes
        browseable = Yes
        guest ok = No
        force user = mzaleczny

Next you should add samba username and provide password for him (the user must be also available in Ubuntu system): smbpasswd -a mzaleczny

Now restart samba daemon for new settings take place: service smbd restart

Finally you can view if share is available by issueing following command: smbclient -L 192.168.8.100

Mounting samba share

Before mounting samba share you must make sure that ubuntu package cifs-utils is installed. If not - install it now: sudo apt-get install cifs-utils After successfully installed cifs-utils you can mount samba share with the command: sudo mount -t cifs -o username=mzaleczny,password=passwd //192.168.8.100/www /mnt/samba_www

Firewall ports

To properly serve samba shares, on the server's firewall should be opened following ports: 137,138,139.