LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 11-13-2003, 03:11 AM   #1
gwroy20
Member
 
Registered: Mar 2003
Location: New York City
Distribution: Slackware 9.1, FreeBSD 5.2.1, OpenBSD 3.3
Posts: 89

Rep: Reputation: 15
Persistent Samba Problem


This is a problem that started out of the blue a few months ago, I'd posted a topic here but no one seemed to be able to figure it out...though I'm sure it must be something simple.

I've got two Slackware boxes running Samba, and to make the story very simple I am only able to write to a Samba-mounted folder as root. If I try to write to a samba share as a regular user I get 'permission denied', no matter what.

The command I use to mount the folder would be similar to

mount -t smbfs -o username=user //server/share mountpoint

This is the smb.conf from the computer I'm currently browsing from, it is similar on the other machine. As a sidenote, I've tried using the default smb.conf file that comes with Slackware with the same result.

[global]
workgroup = ea.com
server string = mirkwood
hosts allow = 127. 192.168.1. 69.22.254.131
encrypt passwords = yes
security = user

[homes]

comment = home directories
browsable = no
writable = yes
guest ok = no
[temp]
comment = temp
path = /mnt/hd2
 
Old 11-13-2003, 03:18 AM   #2
gwroy20
Member
 
Registered: Mar 2003
Location: New York City
Distribution: Slackware 9.1, FreeBSD 5.2.1, OpenBSD 3.3
Posts: 89

Original Poster
Rep: Reputation: 15
Oh, and another thing, this just started today.

I've got a gateway server hooked up with two network cards, one hooked up to a cable modem, the other hooked up to the local network. I'm unable to mount shares on other computers within my network, I'm pretty sure that it's trying to mount the shares using the external address. This has never happened before.

My 'hosts allow' section in smb.conf has always been: 127. 192.168.1.
and it's worked fine. But today I started getting the following error:

1405: session request to 192.168.1.100 failed (Not listening for calling name)
1405: session request to 192 failed (Not listening for calling name)
1405: session request to *SMBSERVER failed (Not listening for calling name)
SMB connection failed

I messed around with it, and if I change the 'hosts allow' file on my server to: 127. 192.168.1. 69.xx.xxx.xxx (my external IP), it connects fine.
 
Old 11-13-2003, 07:01 PM   #3
gwroy20
Member
 
Registered: Mar 2003
Location: New York City
Distribution: Slackware 9.1, FreeBSD 5.2.1, OpenBSD 3.3
Posts: 89

Original Poster
Rep: Reputation: 15
bump, anyone?
 
Old 11-14-2003, 02:51 AM   #4
gwroy20
Member
 
Registered: Mar 2003
Location: New York City
Distribution: Slackware 9.1, FreeBSD 5.2.1, OpenBSD 3.3
Posts: 89

Original Poster
Rep: Reputation: 15
bloody hell
 
Old 11-14-2003, 12:04 PM   #5
jjohnston62
Member
 
Registered: Aug 2003
Location: Minnesota, USA
Distribution: RedHat, Suse
Posts: 106

Rep: Reputation: 15
You might take a look at the samba howto guide, which discusses some problems relating to the smbpasswd integration, and problems with null account access.

Your problem isn't necessarily the smb.conf as it is how samba is integrated with the internal linux accounts.

www.samba.org

Jon J.
 
Old 11-14-2003, 12:15 PM   #6
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
have you done the smbpasswd commands?
 
Old 11-14-2003, 12:19 PM   #7
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
try 'smbpasswd -a %username%'

%username%=any user that has a linux account on that machine

that command will ask you to enter a passwd, you can either use the same one or make up a new one.

Samba doesn't use the passwd file for linux accounts, for security reasons, it has it's own passwd file. Once you have setup a password for a user then you should be able to connect. what i do is setup a user with the same name and password as my windows machine so i don't have to keep entering in user/password info.
 
Old 11-14-2003, 04:10 PM   #8
jamrock
Member
 
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444

Rep: Reputation: 41
Do a "ls -l" and see which Linux users own the share.

If the shares are owned by root, then only root can write to them.

The difficulty sounds like a Linux permissions problem. Samba sits on top of the Linux permissions.
 
Old 11-14-2003, 06:20 PM   #9
gwroy20
Member
 
Registered: Mar 2003
Location: New York City
Distribution: Slackware 9.1, FreeBSD 5.2.1, OpenBSD 3.3
Posts: 89

Original Poster
Rep: Reputation: 15
I should have noted that I can browse the shares from WIndows computers with full permissions.

Thanks for the replies guys. The first problem has really stumped me, because all the permissions are set to read/write access and users on the local machine can browse the shares with no problem. I'm not really a newbie to Samba as I've been using it for two years, all the users have been created with smbpasswd and everything LOOKS like it should work fine. Again, this started happening one day totally out of the blue. Doesn't matter how many re-installs or even upgrades to slackware or Samba itself I do, still happens.

jjohnston62 - thanks for the suggestion, I've been looking through docs all over the web, samba.org also....This is really mysterious.
 
Old 11-14-2003, 06:34 PM   #10
gwroy20
Member
 
Registered: Mar 2003
Location: New York City
Distribution: Slackware 9.1, FreeBSD 5.2.1, OpenBSD 3.3
Posts: 89

Original Poster
Rep: Reputation: 15
The second problem is really getting to me also. Why is it only trying to connect through the external interface? I have set the interfaces and bind interfaces only directives to the proper subnets, and I have a static route through eth0 for all connections from the server to my internal subnet. Very frustrating.

I've just upgraded to Samba 3.0 and done a fresh install. Same problem.
 
Old 11-14-2003, 06:40 PM   #11
gwroy20
Member
 
Registered: Mar 2003
Location: New York City
Distribution: Slackware 9.1, FreeBSD 5.2.1, OpenBSD 3.3
Posts: 89

Original Poster
Rep: Reputation: 15
Happens with NFS also (the permission problem)
 
Old 11-15-2003, 09:27 AM   #12
cmgrif
LQ Newbie
 
Registered: Dec 2001
Distribution: Madrake 8.0
Posts: 14

Rep: Reputation: 0
Have you tried removing the public address from this line?
"hosts allow = 127. 192.168.1. 69.22.254.131"

That just doesn't look right to me.

Chris
 
  


Reply



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
Persistent samba connections with password saved? BrianK Linux - General 4 11-01-2005 05:47 PM
persistent (but unpredictable!) cups problem darksmiley Linux - Hardware 7 06-17-2005 08:05 PM
apt-get persistent t2701 Debian 8 07-25-2004 02:01 PM
persistent mount --bind linuxnube Linux - Software 0 05-12-2004 08:24 PM
Persistent Error hubergeek Linux - Software 2 03-27-2002 12:45 PM

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

All times are GMT -5. The time now is 04:10 PM.

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