linuxnewbie.org.gif
Tuesday, 12-Dec-2000 10:38:18 EST
Newbized Help Files articles discussion board bookshelf sensei's log advertising info

Written By:
Ying Zhang

Getting Samba

As of this writing, the latest stable version of Samba is 2.0.6. You will need the source distribution, it is called samba-2.0.6.tar.gz, grab it from the Samba homepage (http://www.samba.org).

Installing Samba

First thing to do is extract the source distribution. Assuming you've downloaded it to /tmp, do this (you don't need to be root yet):
$ tar -zxvf samba-2.0.6.tar.gz
If you didn't get any error messages, you should have the extracted files in a directory called samba-2.0.6. The Samba source distribution comes with a bunch of packaging scripts. Of particular interest is the one that builds an RPM for us.

Let's put blind-faith into this script and run it (now you have to be root):

$ su
# chown -R root:root samba-2.0.6
# cd samba-2.0.6/packaging/RedHat
# sh makerpms.sh

That should take a little bit of time while it builds the RPM. If that failed then something is wrong, uh-oh time to read the Samba docs. If it worked, these files will be created:

/usr/src/redhat/RPMS/i386/samba-2.0.6-19990228.i386.rpm
/usr/src/redhat/SRPMS/samba-2.0.6-19990228.src.rpm


Magical isn't it.

Okay, let's install this sucker:

# rpm -Uvh /usr/src/redhat/RPMS/i386/samba-2.0.6*.i386.rpm
INSTALLING SAMBA WITHOUT RPM's
Added By: RedRumJack

Okay I was helping Crash last nite via IRC installing Samba. The current NHF was giving him errors on Slack 7.0 trying to create the RPM's. Here is what I had him do.

Download the source.
tar -zxvf sourcefile
cd tosourcedir.
cd /docs/textdocs
vi UNIX_INSTALL.txt
(read through this file and try to get an understanding of what to do next before proceeding)
cd back to source dir.
$ ./configure
$ make
$ su
# make install

From here on you can follow the NHF.
Wow, can things get any easier? Next we will create a new user and group, then some directories. Then we modify a couple of files to use the Samba Web Administration Tool (SWAT).
Creating Stuff

I can't think of a better name for this section, but what we do here is create a bunch of user accounts, directories and files.

New User and Group

Since we are using share level security, we have to specify a guest account. This user account will be called smbuser and it will belong to the smb group.

All the files that Bart and Lisa write to the data and public shares will be owned by smbuser and belong to the smb group.

If you have Linuxconf, use it to do the dirty work. Otherwise, use groupadd and useradd to create the new accounts.

1.Create the group smb

2.Create the user smbuser, the home directory should be in /home/public

Disable login on the smbuser account since no one will actually be logging in with that name.

Public Directory

We should already have a /home/public (since you created it just a sec ago). It should be owned by smbuser and belong to the group smb. Since files in this directory should always be owned by the smb group, we will set the SGID bit on it.
Everyone will have shared read and write access to this directory as well, so the permissions should be set like so:

# chown smbuser:smb /home/public
# chmod 2777 /home/public

Now every file that gets created in /home/public gets owned by the smb group no matter who creates it.

Data Directory

My data directory is /home/samba/data. This should only be accessible by certain people - those that belong to the smb group. So I set up the directory like so:

# mkdir /home/samba
# chown smbuser:smb /home/samba
# chmod 2770 /home/samba

# mkdir /home/samba/data
# chown smbuser:smb /home/samba/data
# chmod 2770 /home/samba/data

Again notice that I set the SGID bit on these directories so that anything created inside them get owned by the smb group.

Since I want access to this directory, I add myself to the smb group. Do this via Linuxconf or the usermod command. Or manually edit the /etc/group file if you feel brave :).

Check your hosts file

You should have an /etc/hosts file that maps host names to IP addresses. Mine would look like this:

/etc/hosts
127.0.0.1 localhost localhost.localdomain
192.168.0.1 homer
192.168.0.2 bart
192.168.0.3 lisa

Create an lmhosts file
The lmhosts file maps hostnames(or IP addresses) to NetBIOS (computer) names. Normally you would probably want the NetBIOS name and the hostname to be the same:

# /etc/lmhosts
localhost homer
bart bart
lisa lisa

It looks a little silly doesn't it, but the thing on the left-hand side is the hostname(or IP address) and the thing on the right is the NetBIOS name.

1 2 3 4
[-Next Page-]

The Linux Channel at internet.com
Linux Planet
Linux Today
Linux Central
Linuxnewbie.org
PHPBuilder
Just Linux
Linux Programming
Linux Start
BSD Today
Apache Today
Enterprise Linux Today
BSD Central
All Linux Devices
SITE DESCRIPTIONS
[-What's New-]
Order a Linuxnewbie T-Shirt
Easy Webcam NHF
Directory Navigation NHF
Installing Snort 1.6.3 on SuSE 6.x-7.x
Customizing vim
The SysVinit NHF
Installing ALSA for the VT82C686 integrated sound
USB Creative Video Blaster II for Linux
Configuring the Intellimouse Explorer in XFree86 V4+
The beginnings of a distro NHF
Getting Past Carnivore?
Getting and Installing PGP
Getting your ATI Rage 128 Working
How to create a multiple partition system
Using Fdisk
Introduction to Programming in C/C++ with Vim
Adding a Hard drive in Linux -- In five steps
Installing ALSA for the Yamaha DS-XG Sound Card
Getting your Diamond Rio Mp3 Player to work with Linux
Bash Programming Cheat Sheet
Installing NVIDIA Drivers for Mandrake
Setting up Portsentry
Hard Drive Speed Tweak for Linux
Sensei's Log
Chat room
Join: Linuxnewbie.org SETI Black Belts!
Send in your news
Click the image to add Linuxnewbie.org to your MyNetscape Page
[-LNO Newsletter-]

[-Archive-]
The beginnings of a distro NHF
Connecting to the Internet using KPPP
Getting your SBLive to work
Unreal Tournament NHF
LWE Day 2 Pictures
LWE Day 1 Pictures
The LNO FAQ!
WoW (Words of Wisdom)
Other sites news
What is Linux?
What is Linux? part deux (ups & downs)
Search newsgroups
The List
ALS Report
Feedback Form
jobs.linuxtoday.com.gif
Match: Format: Sort by:
Search:
[-Quick Links-]

Copyright 2000 internet.com Corp. All Rights Reserved. Legal Notices Privacy Policy

internet.com.gif