LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
Search this Thread
Old 07-07-2007, 09:02 AM   #1
jdmcdaniel3
Member
 
Registered: Jan 2006
Location: Austin
Distribution: openSUSE 11.2
Posts: 167

Rep: Reputation: 31
Lightbulb Samba - Swat - Suse 10.2 Howto


Samba Setup How-To in SuSE 10.2

Date: July 7, 2007
By: James D. McDaniel – Austin, TX

OVERVIEW

I thought I would write up detailed instructions on how I setup Samba to work between Linux and Windows computers. This procedure has worked for me since SuSE 10.0 and including SLED 10 SP1. While SuSE includes some Samba functions in YaST, the best way to control Samba is using SWAT, an HTML page you can access from Firefox in Linux. I will detail how to install, configure and use Samba in SuSE 10.2, but this can be used with little change to most versions of SuSE since 10.0.

LOOKFIRST

Before you setup Samba on your system, here is something to consider. When you installed your copy of Linux, you were required to supply a network Hostname and Domain Name for your network device. Do Not Use these same names when you configure Samba. Very strange things can happen to your SMB shares. You can look at what you entered for your network device using the following commands. Either do not use these names in Samba or change the names you setup here so you can use this name in Samba.

Select: YaST/Network Devices/Network Card/Edit (Active Network Device)

Select: /Hostname and Server Name/Accept

Hostname: xxxxxxxx Domain Name: yyyyyyyy

UPDATE SAMBA

It is best that before we start using Samba, we have the most recent version installed on our Linux system. Here are the instructions to use to perform that task.

Select: YaST/Software/Installation Source

Add The Following (HTTP) Installation Source...

Server Name: us1.samba.org
Directory on Server: /samba/ftp/Binary_Packages/SuSE/3.0/10.2/

Once the Installation Source has been successfully added, now you need to update your version of Samba.

Select: YaST/Software/Software Management

Search for Samba & cifs and update/Install all samba files shown. Normally, you would have Samba files installed except for the document file and so you will just update the correct version for your system, 32 or 64 bit and then elect to install the Samba Document file. You want the document file when you run the SWAT utility.

Select: Finish

MODIFY SERVICE CONFIGURATION FILES

Next we need to modify some configuration files so that Samba and SWAT run services can be activated. You will need to start a terminal session, do a SU command, enter the root password and then use the VI editor to edit these three files. Or, you can run the File Manager in Super User Mode, enter the root password and then navigate to the /etc/xinetd.d folder and use your favorite text editor to edit these files. I use the latter method, but you do it the way you prefer. In each file you will change disable=yes to disable=no and remark out the line only_from = 127.0.0.1 by placing a # symbol in front of the line.

Folder Location: /etc/xinetd.d

Edit Servers File:

# default: off
# description: An internal xinetd service, listing active servers.

service servers
{
type = INTERNAL UNLISTED
port = 9099
socket_type = stream
protocol = tcp
wait = no
disable = no
# only_from = 127.0.0.1
FLAGS = IPv6 Ipv4

Edit Services File:

# default: off
# description: An internal xinetd service, listing active services.

service services
{
type = INTERNAL UNLISTED
port = 9098
socket_type = stream
protocol = tcp
wait = no
disable = no
# only_from = 127.0.0.1
FLAGS = IPv6 Ipv4

Edit SWAT File:

# SWAT is the Samba Web Administration Tool.
service swat
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/swat
# only_from = 127.0.0.1
log_on_failure += USERID
disable = no

ACTIVATE RUN SERVICES

Now we need to activate four runlevel services in YaST. Perform the following tasks in YaST:

Select: YaST/System/System Service (Runlevel)/Expert Mode

Highlight each of the four following services with your mouse and perform the following two tasks on each service. I start from the bottom of the service list and work going up the list:

Select: Set/Reset – Enable the Service
Select: Start/Stop/Refresh – Start Now

xinetd
winbind
smb
nmb

Select: Finish

This saves your selections and starts the required services.

USE SWAT to CONFIGURE SAMBA

Now we are ready to start configuring Samba for use on your Linux system. I normally add an icon on my desktop to access SWAT. ON your desktop, perform the following task:

Right Click on Desktop and select Create New/Link to Application

Enter the name “SWAT” in place of “Link to Application”. Press the icon button next to the name and search for Samba and pick one of the icons that relates to Samba. Next pick the Application tab and enter the following command into the Command Line, “firefox localhost:901” and then press OK to save your entries. It seems like I had to use “firefox 127.0.0.1:901” in one version of SLED depending on your security settings.

If all of the instructions have worked to this point, you should be able to start SWAT by selecting your new desktop icon. When SWAT first starts, you must enter the root name and root password. You can optionally elect to save these names for future use which is how I do it. If you have the SuSE firewall enabled, you are going to have to add some things to get Samba to work, but I normally just run with the firewall off.

When SWAT starts, you should be at the Home location where you can read about all of the Samba parameters which can be very helpful. Pick the globals button at the top to setup your workgroup name and netbios or computer name. The shares button allows you to setup your local shares and the printer button allows you to share your printers. Samba is a very flexible application and its total configuration is beyond the scope of this document. However, I am including a copy of my smb.conf file for your review. I normally have a dual boot system and I share a common software folder and my Windows folder. I have a device driver loaded that allows you to write to a NTFS partition, which you may not have installed. I do not share any printers, but you may wish to do so. For the entry guest account=, I actually created a user called guest and gave them a password. If you use my same file, then you must do the same thing. Here is my Samba configuration file:

Folder Location: /etc/samba

File Name: smb.conf

# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2007/05/30 20:41:20

[global]
workgroup = WINDOWSNT
netbios name = LINUXMASTER
server string =
security = SHARE
map to guest = Bad User
guest account = guest
printcap name = cups
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
logon path = \\%L\profiles\.msprofile
logon drive = P:
logon home = \\%L\%U\.9xprofile
local master = No
domain master = No
idmap uid = 10000-20000
idmap gid = 10000-20000
hosts allow = 192.168.0.0/255/255/255.0, 127.0.0.1
hosts deny = ALL
cups options = raw
include = /etc/samba/dhcp.conf

[software]
comment = Primary Software Storage
path = /Software
read only = No
guest ok = Yes

[windows]
comment = Windows Partition
path = /Windows
read only = No
guest ok = Yes

SETUP DESKTOP ICON to WORKGROUP

Right Click on Desktop and select Create New/Link to Location (URL)

Use your Workgroup name for the “filename” entry. Enter “smb:/workgroup” for the “Link to Location (URL)” where workgroup is replaced by the name you selected for YOUR workgroup name. Press OK to save your entries. Right click on the new desktop icon and pick properties. Press the icon button next to the name and search for Samba and pick one of the icons that relates to Samba. You now have two new icons on your desktop, one that starts SWAT to configure Samba and one to go directly to your workgroup.

CONCLUSION


As of this writing, I have found that Samba version 3.0.25b-0.68-1378-SUSE-SL10.2 to work like a champ between other Samba copies running on Linux and to Windows XP and Windows Vista workstations. Samba is a super flexible program that has many configurations. To learn more about Samba I suggest you visit the web site samba.org and see whats going on.

If you have any problems or issues with these instructions, please let me know.

Thank You,

Last edited by jdmcdaniel3; 07-07-2007 at 04:07 PM.
 
Old 07-07-2007, 08:54 PM   #2
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
Great write-up. Please consider submitting this as a Linux Tutorial. Regular forum posts drop off the front page of threads as they age, whereas tutorials are always visible. Thanks
 
Old 07-07-2007, 11:18 PM   #3
jdmcdaniel3
Member
 
Registered: Jan 2006
Location: Austin
Distribution: openSUSE 11.2
Posts: 167

Original Poster
Rep: Reputation: 31
Talking Thank You

Thanks for your kind comments. I did a post to the area you pointed to. I am not sure if it went through or not as I have not done this before. If I don't hear anything, I will try again.

Thank You,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Samba/SWAT driesel Linux - Newbie 3 02-13-2005 09:33 AM
Samba + SWAT mooler Linux - Networking 5 11-13-2003 09:46 AM
How to start Swat(SuSE 8.2 samba 2.2.7) rmanocha Linux - Networking 6 10-24-2003 03:55 PM
Samba and swat james.farrow Linux - Networking 7 04-04-2003 11:27 AM
Samba Help with Swat? Alinuxnoob Linux - Newbie 9 06-27-2002 06:38 PM


All times are GMT -5. The time now is 11:09 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration