LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-12-2005, 04:32 PM   #1
thorax
Member
 
Registered: Jun 2004
Location: Germany
Posts: 73

Rep: Reputation: 15
Samba: can't access share


Hi

I just set up an OpenBSD machine to serve as a file server for backups of my Windows boxes.

Here's the basic configuration:


OpenBSD 3.6
Samba 2.212 (last release on ports-stable)
IP: 192.168.0.2
Hostname: thor


smb.conf
Code:
workgroup = LAN
unix password sync = Yes
log file = /var/log/samba/log.%m
max log size = 30
preferred master = No
domain master = No
security = user

[Data]
path = /data
force group = mod
read only = No
browseable = Yes
It's hand-written because at the end, I found it easier to deal with it in vi than in Swat

I get a window in which i have to enter the password for the acount 'thor\Guest'. When I try the password for the nobody account on the Samba box, it doesn't work.
When I set security = share, I get the message that the supplied password is invalid (not that I had the chance to enter one).

So, what I need is to have read/write access to the Data-share either when I am logged in on the Windows box with a user name present on the Samba box and in the mod group, or to be able to enter username and password for an account on the samba box when trying to access it.



I think this would be easier if Samba would serve as a Domain Controller, but this is no alternative as the Samba machine isn't supposed to run 24/7

Last edited by thorax; 02-12-2005 at 04:35 PM.
 
Old 02-13-2005, 08:31 AM   #2
cowanrl
Member
 
Registered: Dec 2004
Location: Western Pennsylvania, USA
Distribution: Red Hat
Posts: 150

Rep: Reputation: 15
I'm going to assume you want everyone to have read only access to the data share except for users in the group named mod, who will have read/write access. This is how you would set it up on Linux, I can only assume it would be the same on BSD.

Assuming user thorax is one of the users you want to have write access to the share, make sure thorax is a member of the group mod.
On the /data directory, you need to give the group named mod rwx access to it and all others only r-x access to it.

You need to use security = user in your smb.conf file. You need to create a Samba user named thorax with this command:

smbpasswd -a thorax

It will prompt you for a password. Make it the same as user thorax's password on the Windows machine.

Make the share portion of your smb.conf look like this:

[Data]
path = /data
read only = Yes
browseable = Yes
write list = @mod

In that situation, anyone who has a BSD/Samba username and password on the machine would have read access to the share, those who are a member of mod would have read/write and everyone else would be denied access.

If you wanted to give group mod read/write access and everyone else read access to the share without creating additional user accounts, add the line guest ok = yes to the share definition.
 
Old 02-13-2005, 09:11 AM   #3
thorax
Member
 
Registered: Jun 2004
Location: Germany
Posts: 73

Original Poster
Rep: Reputation: 15
It even got worse


Ok, I've issued the following commands to set the permissions as you told me:

sudo chown :mod /data
sudo chmod u+rwx /data
sudo chmod g+rwx /data
sudo chmod o+rx /data

then I changed my smb.conf

Code:
workgroup = LAN
unix password sync = Yes
log file = /var/log/samba/log.%m
max log size = 30
preferred master = No
domain master = No
security = user

[Data]
path = /data
read only = Yes
browseable = Yes
write list = @mod
Guest Ok = Yes
Now I get the message that I can't login from this computer with this user account. When trying this on a Windows 2000 machine, I even can't get into the workgroup, same error message.

 
Old 02-13-2005, 12:52 PM   #4
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 458

Rep: Reputation: 32
YOU NEED TO CREATE SAMBA USER!!!

read the post by cowanrl
smbpasswd -a user_name
 
Old 02-13-2005, 01:39 PM   #5
thorax
Member
 
Registered: Jun 2004
Location: Germany
Posts: 73

Original Poster
Rep: Reputation: 15
I've done this, I just didn't post it

I've managed to get read/write access for anyone by setting security=share and public=yes. That's at least a basis on that I can work out the rest
 
  


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
Samba Share access Spadge67 Fedora 3 11-19-2005 07:57 PM
samba network share access Goma_2 Linux - Software 6 03-06-2005 01:10 PM
XP user can't access samba share atp777 Linux - Software 0 03-30-2004 06:33 PM
can't access samba share from w2k cliffyman Linux - Software 1 12-10-2003 01:31 PM
Samba share access problem from xp GabeF Linux - Software 2 09-09-2002 03:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration