LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories
User Name
Password
LinuxQuestions.org Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.

Notices

Reply
 
Search this Thread
Old 03-25-2005, 09:48 PM   #1
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Kubuntu 9.04 (workstation) Debian 3.1r4 (file server) Knoppix (troubleshooting)
Posts: 191

Rep: Reputation: 30
Thumbs up Samba success


This may be documented elsewhere, but I didn't find it all together.

The first thing I did was spend some time reading the Samba docs. I highly recommend this.
But, if you're a bit ADD like myself these tips could help avoid hours/days/weeks trying to
figure it out by T&E.

I'm not going to go into how to install the programs on your "server", as the docs are pretty
good at going through that AND it's not difficult to get them running. The difficulty comes in
getting them configured. sigh

(1) I installed the Samba server and daemon on my "server" box. When this is done, make
sure BOTH smbd and nmbd are in your process list (ps ax).

(2) Install SWAT on this same system and make sure it is running, also.

(3) When you're sure smbd and nmbd are running on your "server", go to a box with a GUI (I
didn't try this on the same box, so I can't comment on how it works) and a web browser - ON
THE SAME NETWORK. In the address bar, put in the IP address of the "server" and the
Samba port number (901) as follows:
Code:
192.168.1.1:901
Then you should be able to log in as root and make the changes necessary to the Samba
configuration (mostly in General and Shares) and commit them. Once the changes are
commited (written to the smb.conf file) you need to go to the Status section and restart smbd.

Use of SWAT is highly recommended - once I got this working, the rest of configuring
the server fell into place (and the guess work vanished).


(4) When you're pretty sure you have your configuration set on your server, test your setup
with a Windows box. (Start>Run, '//server' should list the shares available in the drop list) If
you don't have a Windows box on your network, you really don't need Samba - you can
use NFS. Once you can mount the shares in Windows, make sure you have samba,
smbfs and smbclient installed on your Linux client/remote computer. I don't know
for sure if they're all necessary for mounting a Samba share, but I did end up with all three on
my box and I believe they're all helpful.
samba - needed to even consider accessing a system with SMB shares
smbfs - without this, you'll never get anything to mount
smbclient - this was a great troubleshooting tool - it allowed me to see that the
shares were there, accessible, and focus on my client-side configuration instead of guessing
that my server was good-to-go

(5) For the sake of all that keeps us sane - get the syntax for mounting the shares correct.
Once I figured out what I was doing incorrect, I could have kicked myself for blowing the
syntax for weeks.
Code:
mount -t smb //server/share /mount/point -o username=xxxxxx,password=xxxxxx
user and name won't work - it has to be username.

This is not, by any means, an exhaustive HOW-TO on Samba - it's meant to show (1) the
stumbling blocks I ran into and (2) how to avoid the pain and suffering I went through.
 
Old 03-27-2005, 05:58 AM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,174
Blog Entries: 4

Rep: Reputation: 428Reputation: 428Reputation: 428Reputation: 428Reputation: 428
Cool. Have you thought about submitting this to the Linux Tutorials section?
 
Old 03-27-2005, 06:43 PM   #3
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Kubuntu 9.04 (workstation) Debian 3.1r4 (file server) Knoppix (troubleshooting)
Posts: 191

Original Poster
Rep: Reputation: 30
No, I thought the point of "success" stories was to provide guidance and explain how we, the users, got through problems. If it's more appropriate for Tutorials, that's fine.
 
Old 03-28-2005, 04:41 AM   #4
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,174
Blog Entries: 4

Rep: Reputation: 428Reputation: 428Reputation: 428Reputation: 428Reputation: 428
It is a ppropriate for this section, but by leaving it here, it will get buried under all the other stories. By putting it in Tutorials, it becomes easy to find.
 
Old 04-02-2005, 12:16 AM   #5
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Kubuntu 9.04 (workstation) Debian 3.1r4 (file server) Knoppix (troubleshooting)
Posts: 191

Original Poster
Rep: Reputation: 30
I'll look and see if I can find instructions on how to "move" a thread.

Major point of note:
You must add users to your samba server before they will be able to access the shares. I have spent the past three days struggling with a server that was working as Slackware 9.1, then I rebuilt it with Debian Sarge (easier distro from my perspective). I had saved (and reused) my /home fs (which housed all of the shares) and had backed up my samba config files to my home directory. I attempted to re-use these, since I knew they worked. But I continually got this stinkin' dialogue box asking for my username password - and then refused to accept my valid (Linux) username and password.

The key thing to watch for, from my experience, is the dialogue asking for a username and password when you try to open your share (esp. if it *was* working).

I strongly suggest making the Linux, Windows, Samba and/or domain usernames and passwords the same, to reduce the number of logins required. At least, for home or small business networks and while learning. Larger companies may get some benefit from a separate Samba password, but that's more advanced than I am, or what I feel comfortable in advising users on.

Now, for the meat of this post - how to add users to your samba server so they can connect:
Code:
smbpasswd -a <username>
After that, you'll be asked to enter their samba password, twice. Once done, they're in and should be able to mount the share from their Windows box.

Some FYI for folks wondering why I do this. First of all, why am I sharing here? I need to document (somewhere "off site") what I've done so *I* can come back and figure out how to do this, again, when I need to do it again. Plus, I feel I should give back after all of the help I've received here.

Second, the samba server allows me to have access to my files whether I'm in Windows or Linux - the same files. So I don't have to have two copies. I don't have to reboot into Windows to download a file for Windows. And it gives me a great place to store my music and photos (which also happens to be my web and ftp server) to share with everyone else on the network. And them to share their files with me.

I hope this helps SOMEONE besides me. If not, sorry to bore you.
 
Old 04-02-2005, 11:58 AM   #6
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,174
Blog Entries: 4

Rep: Reputation: 428Reputation: 428Reputation: 428Reputation: 428Reputation: 428
The Tutorial section is seperate from the forums. You will have to submit it anew to Tutorials> It can't even be moved by a Mod.
 
  


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
success! genghis Fedora 9 03-25-2006 04:03 AM
Success!!!!!! djrevelation Linux - Wireless Networking 3 10-24-2004 02:14 PM
Success!. Help Available Here. yraen69 LinuxQuestions.org Member Success Stories 9 10-14-2004 08:21 AM
Samba/LinNeighborhood success! ajslideways LinuxQuestions.org Member Success Stories 1 05-13-2004 10:26 AM
Success jrw3179 LinuxQuestions.org Member Success Stories 0 03-17-2003 01:30 AM


All times are GMT -5. The time now is 04:14 AM.

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