LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-09-2004, 06:12 PM   #1
TheOneAndOnlySM
Member
 
Registered: Jul 2003
Location: Dallas, TX
Distribution: Ubuntu 10.04 LTS
Posts: 987

Rep: Reputation: 30
could someone post their working samba.conf file?


i need to see an example of a samba.conf file that allows a windows computer to access linux shares (simple things like the /home/user)

also, if someone could also tell me what usernames need to be placed into the smbpasswd file and what linux/windows is looking for when it prompts for a password when accessing the linux box, it would be much appreciated!
 
Old 04-09-2004, 10:53 PM   #2
TheOneAndOnlySM
Member
 
Registered: Jul 2003
Location: Dallas, TX
Distribution: Ubuntu 10.04 LTS
Posts: 987

Original Poster
Rep: Reputation: 30
please forgive for this, but someone must have a successful samba.conf file...
 
Old 04-10-2004, 01:32 AM   #3
muah
Member
 
Registered: Aug 2003
Location: Europe
Distribution: Slackware (current)
Posts: 228

Rep: Reputation: 33
smb.conf is quite specific to the computer. Why dont u post your smb.conf and we ll try to find out what is wrong.

About that asking for pw: Did u add an existing linux user to the smbpasswd using 'smbpasswd -a username'? Are u trying to login to Samba server with this user and still get an error message?
 
Old 04-10-2004, 01:31 PM   #4
TheOneAndOnlySM
Member
 
Registered: Jul 2003
Location: Dallas, TX
Distribution: Ubuntu 10.04 LTS
Posts: 987

Original Poster
Rep: Reputation: 30
aah, the power of perseverence....

the only reason i didn't post my smb.conf is because in the past, the responses i got weren't very specific or they just kind of brushed aside the problem (which is understandable, since samba is such a powerful and extremely option-filled program); i just wanted to see what a smb.conf file that worked looked like

well, it seems that it was never my smb.conf file that was the problem, but my misunderstanding of how samba (and windows networking) works: the fact that each user needs some sort of verification before being able to access shared resources (and that computers won't magically detect broadcasted shares)

so for those who are having problems with samba: the first thing to understand is authentication (in this case for windows98/ME); the same username and password must be on both the windows and linux box

for example, if you login as bob on your windows machine with the password blabla123, in order to access your linux box, you will need to do in linux
su
adduser (follow onscreen instructions to add user bob with password blabla123)
smbpasswd -a bob (when prompted, give blabla123 as the password)

now your linux box will have a user named bob with his own home directory and who also can be authenticated by samba in the smbpasswd file

now you can go ahead and configure the smb.conf file (either manually or through localhost:901 for swat)

here is my (working) smb.conf file:

# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2004/04/09 22:43:26

# Global parameters
[global]
workgroup = MSHOME
security = USER
null passwords = Yes
ldap ssl = no
encrypt passwords = yes
smb passwd file = /etc/samba/private/smbpasswd

[homes]
comment = Home Directories
browseable = no
read only = no
create mode = 0750

[public]
comment = Public Stuff
path = /mnt/2winData
public = yes
writable = yes
printable = no

*notes: of course this isn't secured (yet), but if you use a router for your network with good security there, you don't need to worry too much about enabling ssl for samba unless you have extremely important data that you cannot risk having stolen;
also, the [homes] share is an automatically-configuring share which will allow the user on a windows machine to have access to his respective /home/user on the linux box

**special acknowledgement and thanks to www.tldp.org (The Linux Documentation Project)!
 
Old 05-01-2004, 05:17 PM   #5
florian_mrt
Member
 
Registered: Mar 2004
Location: Bristol, UK
Distribution: Linux Red Hat 9
Posts: 37

Rep: Reputation: 16
Well, mine didn't work

Thanks for your smb.conf working example because no-one else does what you did. Really glad to hear that at least someone made it working. I've been working on it since 2 months, and although Im not a girl, I am desperate!

I have RedHat9 on a spare part assembled box, LAN is working cause I have internet on the redhat box. I try to log through my laptop with winXPPro, username Florian (the name in the top of the START-menu, right?) and password mypassword. I did what you did using a GUI thing, but tried the same thing nonetheless.

I didnt do su cause i was logged in as root anyway
adduser florian reported user already added which I expected.
smbpasswd florian
mypassword
mypassword
password successfully changed
everything ok there. Changed the smb.conf file EXACTLY like yours, except in the [public] section:
path = /home/samba (a folder I created before with a HelloWorld.txt file in it)

(Does it matter if you add a linux and samba user florian with a lower-case f when you log in WinXPPro with Capital F Florian?

Really, some concentration from someone on my problem would help me forward. Im out of idears. I hoped that someone in my university would be able to better cope with samba stuff, but where do you find such a freak!

HEEEELLLPPP !!!!
 
Old 05-01-2004, 10:06 PM   #6
sandiegocal
LQ Newbie
 
Registered: Mar 2004
Location: san diego
Posts: 16

Rep: Reputation: 0
florian_mrt

a bit of advice: don't try to piggyback your questions onto a thread that someone else has started (and it appears to be closed).

start a new thread, and i will be glad to help.

be sure to state your question and situation as simply and accurately as possible.

your post reminds me of a fable:

There was a fox trying to get to town. On his way along the road, he encountered a river with a very swift current. He started across the river on some stepping stones, and then along a fallen log, and then finally to a sandbar that took him to the middle of the river. At that point, he spied a hound on the other side and called out to him "Hey, can you tell me how to cross the river". "No, I'm sorry.", the hound said, "I have never crossed the river". And the hound turned and walked over the hill into town. You see, if the fox had just asked the RIGHT question, perhaps the hound would have replied "Just continue down the road you were on until you get to town"!

hint: TheOneAndOnlySM already has you way out in the river

ps - send me an e-mail to let me know when you have started a new thread.

Last edited by sandiegocal; 05-01-2004 at 10:15 PM.
 
Old 05-01-2004, 10:20 PM   #7
florian_mrt
Member
 
Registered: Mar 2004
Location: Bristol, UK
Distribution: Linux Red Hat 9
Posts: 37

Rep: Reputation: 16
Jumping foxes - the worlds solution

Look - (Being angry) I want a SOLUTION not a LESSON ! Do me a favor, and post me something usefull to my PROBLEM and not to my BEHAVIOR !

If I didn't had that problem, I wouldn't even be on this forum ! And I wouldn't even read some useless fox stories to my problem - How the hell am I supposed to solve a samba problem with A JUMPING FOX ??

I'll do as you state - I'll post a new post something called like samba problem, among all 1001 other samba problems ! So what do I do? I stick to the 1001 existing topics and I post THERE my problem to save other users from reading a NEW topic ! Bad behavior? I didn't thought so!
 
Old 05-01-2004, 10:47 PM   #8
sandiegocal
LQ Newbie
 
Registered: Mar 2004
Location: san diego
Posts: 16

Rep: Reputation: 0
well, then you can figure it out on your own. good luck.
 
Old 05-01-2004, 11:34 PM   #9
Nichole_knc
Member
 
Registered: Mar 2004
Location: Georgia
Distribution: SlackWare 10.1+, FreeBSD 4.4-5.2, Amiga 1.3,2.1,3.1, Windors XP Pro (makes a fair answering machine)
Posts: 287

Rep: Reputation: 30
here is help

# smb.conf 04/03/2004
#======================= Global Settings =====================================
[global]

workgroup = YOURDOMAIN
netbios name = YOURHOSTNAME
server string = YOURCOMMENT
security = SHARE
guest account = SHAREDDOCUMENTONLINUXINHOMEDIRECTORY
hosts allow = IP.NETWORK.ADDY.YOUUSE/255.255.255.0 127. # not the machine address
write list = root user @admin
printing = lprng
load printers = yes
printcap name = /etc/printcap

# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba.%m
max log size = 50


# Where to find the SSL certificates:
ssl CA certDir = /etc/ssl/certs

# Speed things up
socket options = TCP_NODELAY

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
; local master = no

# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
; os level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
; domain master = yes

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
; preferred master = yes


#
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names via DNS nslookup.
dns proxy = no

#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes


[printers]
comment = All Printers
path = /var/spool/lpd/samba
guest ok = yes
print ok = yes
print command = /usr/bin/lpr -P%p -r %s
lpq command = /usr/bin/lpq -P%p
lprm command = /usr/bin/lprm -P%p %j
lppause command = /usr/bin/lpc hold %p %j
lpresume command = /usr/bin/lpc release %p %j
queuepause command = /usr/bin/lpc stop %p
queueresume command = /usr/bin/lpc start %p


# Shared documents all boxes
[public]
comment = Public Stuff
path = /home/YOURSHAREDDOCS
public = yes
writable = yes
printable = no
guest ok = yes

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %U option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
; comment = PC Directories
; path = /usr/pc/%m
; public = no
; writable = yes



Also you must add a user group in /etc/group for client machines. Also they must be valid users with accounts setup on your linux box per adduser. samba will first check smbpasswd then check passwd for a valid user.

For self help see your distros install HOWTOs in the /usr/doc directory or goto samba.org.
 
  


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
quick favour! post up your lilo.conf closet geek Mandriva 5 12-16-2003 08:59 AM
samba conf file is read-only to root tmoorman Linux - Software 9 11-10-2003 08:23 AM
Can you guys check my Samba conf file? gsmonk Linux - Networking 1 09-19-2003 07:40 PM
Samba start up questions...Setting up share files and smb.conf file Xeroku Linux - Newbie 1 04-17-2003 10:10 PM
proftpd --- need help? could someone post a working proftpd.conf i could look at ZooRoPa Linux - Networking 1 04-02-2003 06:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:44 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration