Share folder access

Hi I am a newbi with linux.

I am trying to set up a share folder on a home network for a media dump and such. I am using Samba via YaST. I have been able to create the Share folder. I have used the Samba dialog to allow access to other machine. My first problem is that I can only get into it with the Guest Access switch set in the Samba Configuration. When do not have it set I get a Dialog box in the windows machines saying User name and Pass. I have tried every account in the linux box with no sucess. I am sure it is very simple but I am unable to find the way. Could someone give me an idea on what a newbi should do?

In guest mode I can not write to the share folder while accessing it from the windows machines. I would presume its becuase I am guest user, but could this be another problem? Sorry for the really BASIC questions.

if you set User Level Security (security = user) you should create samba users with “smbpasswd -a user_name” and ensure that linux user has rights to write in respective directory. Also the share should contain option “read only = No”.
In order to go further, at least, post your /etc/samba/smb.config file.

Thank you, I will post the smb.config file contents tonight when home from work.

Hi here is the smb.conf file. I did the changes you suggested and still unable to connect when not in guest mode. Thanks so much for the help.

smb.conf is the main Samba configuration file. You find a full commented

version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the

samba-doc package is installed.

[global]
workgroup = ********
passdb backend = tdbsam
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \%L\profiles.msprofile
logon home = \%L%U.9xprofile
logon drive = P:
usershare allow guests = Yes
idmap gid = 10000-20000
idmap uid = 10000-20000
security = user
usershare max shares = 100
wins support = Yes
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = Yes
domain master = Yes
local master = Yes
os level = 65
preferred master = Yes
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes

Share disabled by YaST

[profiles]

comment = Network Profiles Service

path = %H

read only = No

store dos attributes = Yes

create mask = 0600

directory mask = 0700

Share disabled by YaST

[users]

comment = All users

path = /home

read only = No

inherit acls = Yes

veto files = /aquota.user/groups/shares/

Share disabled by YaST

[groups]

comment = All groups

path = /home/groups

read only = No

inherit acls = Yes

[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No

Share disabled by YaST

[print$]

comment = Printer Drivers

path = /var/lib/samba/drivers

write list = @ntadmin root

force group = ntadmin

create mask = 0664

directory mask = 0775

[AMOSERVER]
comment = private depostitory
inherit acls = Yes
path = /home/tim/AMOSERVER
username = timothy
guest ok = Yes
write ok = yes
inherit permissions = Yes
read only = No

[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
write list = root

Hi,

Your problem seem to be an authentication or authorization one.

I suppose that the smb.conf section of the Samba share concerned by your problem is the following:

First remark: the username option is deprecated (cf man smb.conf). Samba uses underlying UNIX security instead. You should delete this line from smb.conf or use YaST Samba module to delete this option for the share.

About authentication: have you added Samba users as isemionov said using smbpasswd -a user_name?

About authorization: could you put here the security information of /home/time/AMOSERVER using ls -l /home/time/AMOSERVER?

On 7/11/2013 8:36 PM, rainstir wrote:
>
> Hi here is the smb.conf file. I did the changes you suggested and still
> unable to connect when not in guest mode. Thanks so much for the help.
>
> # smb.conf is the main Samba configuration file. You find a full
> commented
> # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if
> the
> # samba-doc package is installed.
> [global]
> workgroup = ********
> passdb backend = tdbsam
> printing = cups
> printcap name = cups
> printcap cache time = 750
> cups options = raw
> map to guest = Bad User
> include = /etc/samba/dhcp.conf
> logon path = \%L\profiles.msprofile
> logon home = \%L%U.9xprofile
> logon drive = P:
> usershare allow guests = Yes
> idmap gid = 10000-20000
> idmap uid = 10000-20000
> security = user
> usershare max shares = 100
> wins support = Yes
> add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody
> -s /bin/false %m$
> domain logons = Yes
> domain master = Yes
> local master = Yes
> os level = 65
> preferred master = Yes
> [homes]
> comment = Home Directories
> valid users = %S, %D%w%S
> browseable = No
> read only = No
> inherit acls = Yes
>
>
<snip>
>
> [printers]
> comment = All Printers
> path = /var/tmp
> printable = Yes
> create mask = 0600
> browseable = No
>
>
<snip>
>
> [AMOSERVER]
> comment = private depostitory
> inherit acls = Yes
> path = /home/tim/AMOSERVER
> username = timothy
> guest ok = Yes
> write ok = yes
> inherit permissions = Yes
> read only = No
>
>
> [netlogon]
> comment = Network Logon Service
> path = /var/lib/samba/netlogon
> write list = root
>

rainstir;

You have configured Samba to act as a PDC. Did you really mean that? To simply share files a simple workgroup environment should
suffice.

Here are a couple of guides you should find helpful. The first two were written with openSUSE 11.x in mind but should be mainly
valid with version 12.x. The third not only explains setting up your workgroup it also provides a script to assist you.

For a overview of Samba 3 and /etc/samba/smb.conf see:
http://swerdna.dyndns.org/suselanprimer.html

For examples of shares see:
http://swerdna.dyndns.org/susesambaserver.html

jdmcdaniel3 has written a Bash scrip to automate setting up a Samba for a workgroup.

https://forums.opensuse.org/blogs/jdmcdaniel3/s-c-t-samba-automated-configuration-tool-version-1-02-124/


P.V.
“We’re all in this together, I’m pulling for you” Red Green

ls -l /home/tim/AMOSERVER
total 32
drwxr-xr-x 32 tim users 4096 Jul 10 15:29 home
drwxr-xr-x 75 tim users 20480 Jul 11 01:41 Movies
drwxr-xr-x 5 tim users 4096 Jul 8 15:17 Private
-rw-r–r-- 1 tim users 1963 Jul 11 11:08 smb.conf

rainstir;

You have configured Samba to act as a PDC. Did you really mean that? To simply share files a simple workgroup environment should
suffice.

Here are a couple of guides you should find helpful. The first two were written with openSUSE 11.x in mind but should be mainly
valid with version 12.x. The third not only explains setting up your workgroup it also provides a script to assist you.

For a overview of Samba 3 and /etc/samba/smb.conf see:
Samba and Suse: HowTo Set up an openSUSE-Windows Home Office LAN/Network. Versions 11.x

For examples of shares see:
Samba Server and Suse / openSUSE: HowTo Configure a Professional File Server on a SOHO LAN

jdmcdaniel3 has written a Bash scrip to automate setting up a Samba for a workgroup.

https://forums.opensuse.org/blogs/jdmcdaniel3/s-c-t-samba-automated-configuration-tool-version-1-02-124/


P.V.
“We’re all in this together, I’m pulling for you” Red Green[/QUOTE]

Hi, I tried as a workgroup and it wanted a password to get into the workgroup… so I fiddled around with it and found this way I did not need a password to the workgroup. Its a windows workgroup and I dont have a password to it. I will start reading the links you have offered. I did say I was a newbi and boy am I. I was hoping it would be easer than it is turning out to be.

Agreed. A PDC is oversized for a simple Samba share, but it should gives access to the shares anyway. Doesn’t it? For some reasons I don’t know, in openSUSE reference guide “Sharing Files between Linux and Windows with Samba”](http://doc.opensuse.org/documentation/html/openSUSE/opensuse-reference/cha.filetrans.html#sec.filetrans.linux2win) tutorial, they use a PDC… So I’m not surprised to see it there.

This can be changed easely with YaST Samba module by changing the server role from PDC to Standalone.

From this we know that if you want a non-guest Samba account to have read/write to your share, this Samba account must be tim. Samba accounts are managed separately from UNIX accounts but use UNIX security information. Can you run the following command and show the results here?


pdbedit -Lv

This command will show the Samba accounts you have.

By the way, why do you have a smb.conf file bellow /home/tim/AMOSERVER? Un-less you have a very un-common configuration, it shouldn’t be an issue but I’m surprised to see a Samba configuration file here.

EDIT

I’m not sure to understand. You say:

Do you mean that:

  • You want to be able to access your Samba share from your Windows machine without be prompted for login/password
  • You don’t want anonymous/guest access to your share

Please correct me if I misunderstood your goals.

This edit section changes nothing to the remaining of my post.

Thanks for the help, when I am home from work I will reply in detail to your post.

I have put the replys inside the quoted area.*

I have put the replys inside the quoted area.*

In Yast, if I am not have the button PDC clicked, when I go to close the Samba part of YaST it will ask me of a Domain name & PW… or to ignore it. I did try to ignore it but that didnt help anything. I dont have a name and pw for the windows domain.

Understood.

From this output we see you only have a Samba root account. You need to populate the Samba account list manually using smbpasswd. As your share is read/write for the UNIX account tim, you sould do as isemionov suggested in post #2:


#smbpasswd -a tim

Enter a password for the Samba account tim and confirm. You should then be able to access your Samba share from your Windows box using tim as username and the password you provided to smbpasswd.

On 2013-07-13 05:16, rainstir wrote:
> I have put the replys inside the quoted area.

Then I can not read it at all.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

I would like to thank everyone of your help. I do feel like a real dummy. Yesturday I spent a great deal of time trying to fugure it out… over and over I could not log in from the client computer (my desktop). So I fired up my Sager lappy that is running sys7 and works very well… Much better than my desktop vista system. To my utter shock I was able to log-in and could make changes to the entire shared folder and it’s contents. It seems my vista machine is limping pretty hard these days… I am now cleaning it and doing all the oh so wonder things you do before you format and install…

Thanks again for everyones time and help hugs!

Not to self “dont trust windows over linux”

You are welcome ;).

Darn, I should have asked you which Windows version your client have… Windows Vista security is far much paranoïd than Windows 7 (I said paranoïd, not better!). So, Windows Vista could reject Samba authentification methods. See this thread for some hints. I cannot help you specificaly with Windows Vista as I don’t own a licence for this OS. Maybe the thread is obsolete, maybe not.