LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 05-12-2013, 04:44 PM   #1
GTCG
LQ Newbie
 
Registered: May 2013
Location: Belgium
Distribution: Busybox (small distro that comes with Pogoplug), Win7, winXP
Posts: 10

Rep: Reputation: Disabled
problem with password protected samba-share


Hello,

I have a pogoplug with 2 hard drives connected to it. To be able to share those with my windows 7 PC, I have installed samba on the pogoplug and turned them into smb-shares.

This process went fine and I could access, read and write on my shares.

To have a sense of security (and so I could learn also) I tried to put a password on those shares. I have read a lot, and followed this guide to get the job done, adapted on my own version of linux on the pogoplug. I called the group "samba" and the user "thomas". See below for the copy-paste of the guide

As I have 2 drives, I tried this config on one of them so I could compare with the other one.

---

Install samba on the server

# yum install samba

Create the group that all the samba users will be contained in, for example 'samba'

# groupadd samba

Create samba users and add it to the above group, which is in this example is 'samba'. Below is the example to create a user named 'user1' and add it to group 'samba'. Set the password for user1

# useradd user1 -g samba
# passwd user1

Create the directory to be shared. In this example, i will use /home/shared. Change the ownership to root and group ownership to the 'samba' group. Change permission so that only user and group can read write and execute

# mkdir /home/shared
# chown -R root.samba /home/shared
# chmod -R 775 /home/shared

Below is a simple setting of samba

[global] workgroup = samba
server string = Samba Server
security = user [shared_folder]
comment = Sharing place
path = /home/shared
public = no
writable = yes
printable = no
write list = @samba
create mask = 0755
force create mode = 0755
directory mask = 0775
force directory mode = 0775
What the above setting does basically is to setup /home/shared as samba shared directory but can only be accessed by user from group samba

Add user/users to samba

# smbpasswd -a user1

Start smb service, restart if it has already been started

# /etc/init.d/smb start
---

See the relevant part in my smb.conf after the changes. I tried the changes on [Helios]. Daedalus remains accessible after the samba restart.

[Helios]
comment = HD1 Network share
path = /tmp/.cemnt/mnt_sda1/
available = yes
public = no
writable = yes
printable = no
create mask = 0755
write list = thomas
force create mode = 0755
browseable = yes
directory mask = 0775
force directory mode = 0775
security = user

[Daedalus]
comment = HD2 Network share
path = /tmp/.cemnt/mnt_sdb1/
available = yes
public = yes
writable = yes
printable = no
guest ok = yes
guest only = yes
create mask = 0777
browseable = yes

When trying to access the Helios share, windows7 asks me for a password.
I am sure I added thomas as a linux user via "adduser" and as a samba user via "smbpasswd".


Error in windows7 is "The specified network password is not correct. Did I forget to add something or did I make a mistake somewhere?

Thanks in advance!
 
Old 05-12-2013, 05:45 PM   #2
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 244

Rep: Reputation: 37
a look at /var/log on the server end might throw a bit more light on the issue. /var/log/messages is a useful resource and there should be some logs specific to your windows device under /var/log/samba - I had to play around with a raspberry pi at the weekend and there was a log.raspbmc.

Good luck
 
Old 05-12-2013, 06:07 PM   #3
gdizzle
Member
 
Registered: Jul 2012
Posts: 197

Rep: Reputation: Disabled
Paste the result of:

Code:
testparm /etc/samba/smb.conf
Watch the logs:

Code:
tail -f /var/log/messages Or /var/log/samba
, or however you have it setup:

Test the samba share from the pogoplug

Code:
smbclient -L //server -U user
Connect to a SMB share with
Code:
smbclient //server/share -U user

Also with the
Code:
[Helios]
#security = user
comment #security out in this share your in your smb.conf

You already have it specified at the top of smb.conf
 
1 members found this post helpful.
Old 05-15-2013, 04:50 PM   #4
GTCG
LQ Newbie
 
Registered: May 2013
Location: Belgium
Distribution: Busybox (small distro that comes with Pogoplug), Win7, winXP
Posts: 10

Original Poster
Rep: Reputation: Disabled
Hello

Thanks for the replies. I got it working since this evening. Thanks for your advice! @gdizzle: i adapted my smb.conf.

GTCG
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
samba password protected share Gil@LQ Linux - Server 4 02-07-2012 03:26 AM
[SOLVED] SAMBA sharing one no public folder password protected infoslaw Linux - Newbie 8 12-30-2011 04:07 AM
Samba password protected shared Folder Mrpeepers310 Linux - Networking 5 09-18-2010 10:04 AM
Un-Protected share on XP System wants password when accessed by linux thealmightyos Linux - Networking 16 03-27-2009 01:50 PM
Samba - Passwd protected share with Windows XP Home uhcafigdc Linux - Server 4 10-31-2008 10:38 AM


All times are GMT -5. The time now is 11:30 PM.

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