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 - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-08-2010, 06:46 AM   #1
Magos Mechanicus
LQ Newbie
 
Registered: Dec 2010
Distribution: Debian, Fedora
Posts: 2

Rep: Reputation: 0
Samba rejects client passwords?


I'm not entirely sure I'm posting this in the right place - I'd certainly call myself a newbie and my question does involve Windows, but the Linux General sticky mentions samba as a reason not to post it there... If I'm in the wrong place feel free to move.


So a while back I decided I wanted to get to know Linux a little bit and I figured the most immediately useful thing for me would be a small home server. About this time I discovered plug computers and I eventually bought myself a Guruplug for this purpose - a small, cheap, power-efficient ARM architecture thing running Debian 5.0.6. Since then I've kind of ambled along with the project as and when time permitted (installing, tweaking, scouring manpages and tutorials is fun, but takes a lot of time), and have now finally got a nice big external harddrive formatted as ext3 and hooked up to it. The time seemed right to go for the samba install. I installed from the Debian repository, configured using SWAT and immediately hit problems.

Since the only user is me and the only access to the computer is over SSH, I have few accounts - there's root which I've disabled from access altogether, there's my sudoer account magnus, and there's my new test account magnus-smb. This one is a standard user, and has identical Unix password and samba password (added with smbpasswd). I intend to keep this up with a separate samba-access account - I'm a little paranoid about allowing any kind of access to sudoer accounts and won't even let SSHD accept password based logins.

Setting up samba, I basically tried to make it do as little as I needed to get a local file server going. The only share is homes, and its path goes to my external drive. The drive itself is mounted as rw,noexec,user from fstab.

Now, with all of that set up I'd hoped I'd be able to mount my homes shares and go. This proved not to be the case - if I set encrypted passwords = yes, my Windows 7 clients behave differently. The magnus account connects but can't authenticate - all passwords are rejected. The magnus-smb account is apparently accepted but then receives a "network path not found" error. If I set it to no, both accounts are prevented from even attempting to authenticate, and I get an error message about "this account is not approved for logging on from this station" (translation from Norwegian). I've been searching around but not finding much. I did find one article claiming this was easier after samba 3.3 and discovered that my manpages said samba 3.2. Yesterday I therefore decided to reinstall samba from source, only to find that the current stable release (3.5) also claims to be version 3.2 in it's manpages, so I probably might as well not have bothered. Oh well, at least I've installed something from source now. Should be useful experience.

I'm kind of lost in figuring out where it's going wrong, and I'm hoping some more experienced eyes can spot it.

My smb.conf:
Code:
# Samba config file created using SWAT
# from UNKNOWN (Q@)
# Date: 2010/12/08 12:59:41

[global]
	workgroup = HOME
	server string = %h server
	obey pam restrictions = Yes
	pam password change = Yes
	passwd program = /usr/bin/passwd %u
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	unix password sync = Yes
	syslog = 0
	log file = /var/log/samba/log.%m
	max log size = 1000
	dns proxy = No
	panic action = /usr/share/samba/panic-action %d
	hosts allow = 10.0.0.0/255.255.255.0

[homes]
	comment = Home Directories
	path = /external/sambadata/%S
	valid users = %S
	read only = No
	create mask = 0700
	directory mask = 0700

Last edited by Magos Mechanicus; 12-08-2010 at 07:00 AM.
 
Old 12-08-2010, 06:59 AM   #2
djsmiley2k
Member
 
Registered: Feb 2005
Location: Coventry, UK
Distribution: Home: Gentoo x86/amd64, Debian ppc. Work: Ubuntu, SuSe, CentOS
Posts: 343
Blog Entries: 1

Rep: Reputation: 72
Is there anything in the samba log file?

My samba shares which i setup myself (not using swat) look like this:

[shared]
comment = Storage Area
browseable = yes
public = yes
guest ok = yes
writable = yes
path = /home/tim/shared


I notice you dont have a browsable - I'm not sure what the default is for this, hense why I explicity set it.

Also you dont have (not that I know if they are REQUIRED):

passdb backend = smbpasswd
# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = share

in your global options...
 
1 members found this post helpful.
Old 12-08-2010, 07:43 AM   #3
Magos Mechanicus
LQ Newbie
 
Registered: Dec 2010
Distribution: Debian, Fedora
Posts: 2

Original Poster
Rep: Reputation: 0
Inspecting the logs proved a little tricky because there're tons of them, my account apparently isn't allowed in there and sudo can't cd for some reason. Still, I cat-ed and grepped some logs and found that one of them was going
Code:
'/external/sambadata/magnus-smb' does not exist or permission denied when connecting to [magnus-smb] Error was No such file or directory
over and over. I created the directory manually, chowned it and now things apparently work fine - I can connect from my client. Weird. I thought samba could create those? Or do I need to mess with permissions for the /external/sambadata directory for that to work?

Thanks a lot for the help. I left passdb backend at the default value of smbpasswd, and it seems to be the same with security = user and browseable.

Edit: And now apparently Windows can add, move and read files on it, but not delete them. File permissions again?

Last edited by Magos Mechanicus; 12-08-2010 at 08:04 AM.
 
Old 12-11-2010, 04:29 AM   #4
djsmiley2k
Member
 
Registered: Feb 2005
Location: Coventry, UK
Distribution: Home: Gentoo x86/amd64, Debian ppc. Work: Ubuntu, SuSe, CentOS
Posts: 343
Blog Entries: 1

Rep: Reputation: 72
Quote:
Originally Posted by Magos Mechanicus View Post
I thought samba could create those? Or do I need to mess with permissions for the /external/sambadata directory for that to work?

Edit: And now apparently Windows can add, move and read files on it, but not delete them. File permissions again?
Most likely and errrr most likely

Sadly experimentation seems to be the best way to find out. I think you need +x to be able to delete files.
 
  


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
LXer: Do you want the alpine email client to remember your passwords? LXer Syndicated Linux News 0 10-09-2009 01:30 AM
updating samba passwords with system passwords paranoid times Linux - Software 3 10-03-2006 09:04 PM
How to setup samba client to use plain passwords pinknick Linux - Networking 3 11-30-2005 05:45 PM
SAMBA rejects client xp login azmadar Linux - Newbie 2 09-14-2004 11:08 AM
Is there a way to sync Samba passwords with linux user passwords MarleyGPN Linux - Networking 2 09-09-2003 10:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:39 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