Problem
How to enbale Samba on a Linux system.
Analysis
This setup was made on a Mandriva system.
Solution
You need basically three things:
- Install Samba services
- Setup Samba services
- Configure your firewall
Then you just need to restart Samba and firewall and you are set.
Installing Samba
In Mandrake install Samba easy:
# urpmi samba-common # urpmi samba-server # urpmi samba-client
Edit your Samba config file
Set at least the following in /etc/samba/smb.conf :
workgroup = <YOUR_WORKGROUP_NAME> netbios name = <YOUR_NETBIOS_NAME>
Configure firewall
For Shorewall you add to your /etc/shorewall/rules file this:
... ACCEPT net fw udp 137:139,445 - ACCEPT net fw tcp 137:139,445 - ...
This will enable SMB and NMB related ports. What are these ports for? Check your /etc/services file and you will see:
... netbios-ns 137/tcp # NETBIOS Name Service netbios-ns 137/udp netbios-dgm 138/tcp # NETBIOS Datagram Service netbios-dgm 138/udp netbios-ssn 139/tcp # NETBIOS session service netbios-ssn 139/udp
... microsoft-ds 445/tcp microsoft-ds 445/udp ...
Restart services
# service shorewall restart # service smb restart
References
none
Enbaling Samba on Linux