June 22nd, 2009
[Tips] OpenSuse 11.1 x64 Samba Server configuration
Computer Hardware & Software, Software review, Tips & trick, by brigs.
Samba is like a portal service to make communication protocol between Linux to Windows or change order way todo. Yes, we can share file or printer service between them. There are two component must be installed first before you go to using them.
1. Samba and samba client
2. Firewall, OpenSuse self bring builtin firewall with the package, you can using it or make custom configuration iptables later.
1. you can instaling samba and samba-client with YAST Software Management (GUI) or zypper. These is example console mode config and you must run with superuser privilege :
$ sudo zypper in samba
Wait for a while to let zypper downloading and installing two important package of samba. For easy configuration in GUI mode you can install too yast2-samba-server and client later.
2. Built-in Firewall
Unfortunately there is some bug on Firewall OpenSuse 11.x to open the right port for Samba. Here a step if planning using it. First you must check suse firewall configuration on /etc/sysconfig/susefirewall2.
$sudo cat /etc/sysconfig/SuSEfirewall2 | egrep “FW_SERVICES_ACCEPT_RELATED_EXT|FW_CONFIGURATIONS_EXT”
W_CONFIGURATIONS_EXT=”"
# see comments for FW_CONFIGURATIONS_EXT
# see comments for FW_CONFIGURATIONS_EXT
FW_SERVICES_ACCEPT_RELATED_EXT=”"
# see FW_SERVICES_ACCEPT_RELATED_EXT
# see FW_SERVICES_ACCEPT_RELATED_EXT
# e.g. FW_SERVICES_ACCEPT_RELATED_EXT
# See also FW_SERVICES_ACCEPT_RELATED_EXT
Look at two uncomment configuration with blank, fill them with your favorite editor. You can using run with command “kdesu kwrite /etc/sysconfig/SuSEfirewall2″ (without quote).
Change 2 line with blank option with :
FW_CONFIGURATIONS_EXT=”samba-server”
FW_SERVICES_ACCEPT_RELATED_EXT=”0/0,udp,137″
Second touch, you must re-check configuration on /etc/sysconfig/SuSEfirewall2.d/services/samba-server with command :
$sudo cat /etc/sysconfig/SuSEfirewall2.d/services/samba-server | egrep “UDP=|BROADCAST=”
UDP=”"
BROADCAST=”"
Fill them again with :
UDP=”netbios-ns netbios-dgm”
BROADCAST=”netbios-ns netbios-dgm”
3. Okey, you just finish with firewall configuration, now you must open smb.conf file in location /etc/samba/smb.conf file. Add 3 line to [global] paragraph :
name resolve order = bcast host lmhosts wins
preferred master = yes
os level = 65
On network configuration you must using static IP address for easy share, you can configuring in Yast -> Network Device -> Network setting. Reboot your PC for applying new config.
Last, you will be asked for credentials when you access some of the Linux shares. You need to add your username to the Samba user database. Then you can supply your credentials. Open a console and enter this command and then supply passwords when asked:
$sudo smbpasswd -a your_username
Or you can using guest account for easy sharing wthout permission user….
4. Custom iptables firewall. Like i’m using custom config iptables for my firewall configuration with samba. I choosing them cause my dialup modem configuration using DHCP ip addreess come with ISP but OpenSuse firewall can’t filtering any package that coming from outside. You can ignore no.2 configuration here. You just only need to stop OpenSuse firewall running in your machine. Here a script, download and place on safe place. You can configuring file /etc/init.d/boot.local for boot running. The script allow me for sharing internet connection with local address.
Download the iptables script with sharing enable here













Responses to “[Tips] OpenSuse 11.1 x64 Samba Server configuration”
Leave a Reply