Re: [Samba] The way things used to work...

2009-02-19 Thread Dragan Lukic
Hello Dale,

I must say, your answer pushed me into more testing, and although it was not 
exactly answer that is visible in my solution, testing around your proposal 
finally got me where I wanted to be.

Now to describe my steps:
-1. Change mod for shared directory and it's all existing contents to 755 via 
file manager (Dolphin)
-2. Changed permissions on shared directory and assigned GID also via file 
manager
-3. Started smb service

smb.conf that does it all is bellow:
#=== Global Settings =
[global]
   workgroup = FOO
   server string = FOO
   security = share
   hosts allow = 192.168.125. 127.0.0.
   log file = /etc/samba/log/%m.log
   local master = yes
# Share Definitions ==
[Share]
path = /home/foobar/Documents/Share
create mask = 0777
force create mode = 0777
directory mask = 0777
force directory mode = 0777
public = yes
writable = yes


Now to elaborate :-)

First step is self explanatory, directory on file system must have sufficient 
permissions.
Second step is just for fixing group ownership for pasted files, and now all 
files are owned by nobody:localgroup although all are rwxrwxrwx
And third step (you will notice a bit modified conf) was to load that conf 
file.

Now, while testing all that comes to mind, I can relay this "debugging" info:
- Assigning UID along with (or later on) GID on shared directory via file 
manager does not work as GID, so ownership in that case is not 
localuser:localgroup but nobody:localgroup, thus preventing local user of 
changing pasted/shared files locally. fixed with 0777 permissions for create 
mode&mask.
- No files can be changed via samba, ie. cant open .odt file via samba at all, 
or even if possible, no changes can be saved, even if save as dialog is used 
and pointed to the same file on share. 0777 permissions for create mode&mask 
helped with all but any files that are opened with OOO
- There was ALWAYS error on first paste to shared dir via samba, while 
overwrite of existing file worked fine. That was resolved with 0777 
permissions for create mode&mask.
- if inherit owner = yes is omitted, there is no error, but I get back to 
nobody:localgroup ownership, and again  files can't be changed, also resolved 
with 0777 permissions for create mode&mask.
- since I have played at home, both remote and local user are the same, so I 
get good results, but I am still not sure will that inherit owner option work 
as I see now, or it will create file with remoteuser:localgroup permissions
- any usage of force user&group instructions will bring following error 
message: An error occurred while loading smb://hostname/Share:
The file or folder smb://hostname/Share does not exist

So, while it is against all decent Linux usage, granting 0777 permissions 
through smb.conf produces result that I needed.
In this way I can get behind forcing/inheriting owner and group, and local 
user can change files from local filesystem.
Now also txt files can be edited via samba, but not files that are opened by 
OpenOffice, so I guess that issue is within OOO.

So much hassle just to apply "normal" Linux usage and permissions.

It is still not so elegant solution, as smb.conf that I started with was, but 
if it is working, I am happy :-).

P.S. I guess that 0666 for create mode&mask instead 0777 would also work, but 
that number just look odd ;-)

Once again, many thanks to you all. If sometimes later on becomes possible to 
enforce user and group (that is true to produce "does not exist" error), as it 
was on older versions, I would be more than happy to use it again. Giving 777 
permissions just does not feel right.


On Wednesday, 18. February 2009. 17:25:43 you wrote:
> Dragan,
>
> I have reread your original post, and it sounds as if you have
> everything working except for user/group ownership of files created by
> Samba.
> The following steps have worked for me with security = user.  I do not
> know if they will work for security = share.
>
> chmod 2755 /home/foobar/Documents/Share (and to any existing
> subdirectories, if any)
>
> In [Share], change the following
> directory mask = 2755
> force directory mode = 2755
>
> add to [Share]
> inherit owner = Yes
>
> Also, in [global], the current syntax is
> security = share
> not
> Server security = share
>
> See if this might work for you.
>
> Dale





signature.asc
Description: This is a digitally signed message part.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] The way things used to work...

2009-02-16 Thread Walter Mautner
Am Monday 16 February 2009 21:00:04 schrieb Dragan Lukic:

> OK, I might not be a most polite person, but for sure I am not rude. Do
> have in mind that english is not my native language, and as I am not using
> it on day to day basis (spoken or written) my sentences might look/feel odd
> or as you put it "in your face".
> After ~4 months without solution, one can get a bit disappointed, and
> therefore a bit aggravated. Or it is just me ...
>
Perhaps you didn't reveal enough of your problem, or your problem isn't a 
samba problem ...

> > > 123 days with no solution, well my patience is getting thin...
> >
> > I've seen at least 2 or 3 responses with suggestions to your LAST rant,
> > but no response from YOU.
> >
> > > Please help me get this working in new samba
>
> Lack of response from me is easy to explain. Nothing worked. I would be
> more than happy to report back that suggested solution worked, how it
> worked, have I made any changes, and of course I would paste that config
> here so anyone else can use it if found in similar situation.

It would really be nice to know - for us it looks like you never even bothered 
to  try, instead just continued to whine.

.

> Only once I was close to my goal, files were showing as owned as user:group
> of local user via smb but not if accessed directly through file manager,

You can't expect that. For your local linux file manager, the unix/linux 
settings (users umask, sgid flags, permissions, acls ...) apply - samba can 
only modify permissions on files it created or accessed.
In fact, your problem isn't a samba problem.

Some settings defaults may have changed between the versions, but that doesn't 
affect your "file manager".
Since you never posted the permission set of your share main directories, we 
simply had no clues due to no specific errors, no logs posted.

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] The way things used to work...

2009-02-16 Thread Dragan Lukic
On Monday, 16. February 2009. 17:33:45 Charles Marcus wrote:
> On 2/16/2009 7:31 AM, Dragan Lukic wrote:
> > Can anyone help me?
> >
> > I cannot imagine why is my question so hard
> >
> > Looks like I will have to make at least one post to this thread each day
> > until I finally get a reply/solution.
>
> Doing that will likely get you totally ignored by most everyone here...
> being 'in your face' is not generally a good idea when it comes to free
> support for free software.

OK, I might not be a most polite person, but for sure I am not rude. Do have 
in mind that english is not my native language, and as I am not using it on 
day to day basis (spoken or written) my sentences might look/feel odd or as 
you put it "in your face".
After ~4 months without solution, one can get a bit disappointed, and 
therefore a bit aggravated. Or it is just me ... 

>
> > 123 days with no solution, well my patience is getting thin...
>
> I've seen at least 2 or 3 responses with suggestions to your LAST rant,
> but no response from YOU.
>
> > Please help me get this working in new samba

Lack of response from me is easy to explain. Nothing worked. I would be more 
than happy to report back that suggested solution worked, how it worked, have 
I made any changes, and of course I would paste that config here so anyone 
else can use it if found in similar situation.
I have tried all that was told to me, and whatever I found on samba pages, 
that seemed relevant to me. But since I am NOT samba expert, I might been 
looking at wrong places, or just not looking at all places.

>
> There is paid support available, and it sounds like this is what you
> really want:
>
> http://us1.samba.org/samba/support/

It might be my misunderstanding, but paid support is for cases when me as a 
user brake something that was working by default, but NOT in case when I get 
broken thing to start with.
Config file in question was (and still is) working on previous versions of 
samba, on at least 3 different distro-s, and as I recall 6 versions in total 
(2 of each distro). All I had to do was to install and later on upgrade. I 
have not change this file for a while... why would I.. it works. Only thing 
changed is samba, and since I was told that what I want/need is possible, I 
can only assume that software is broken in some way, since I followed all what 
was told to me, but still without success.

Only once I was close to my goal, files were showing as owned as user:group of 
local user via smb but not if accessed directly through file manager, thus 
preventing local user to change his files locally, since ownership was (on 
local access) nobody:user or user:nogroup (or something like it... was too far 
ago and not working so I have not remembered it).

Anyway, thank you all for all your replies... Thank you that you took the 
time... it is just not working yet and that is what makes me scratch...

I am sorry if my posts sounded rude/unpleasant/in your face, they were never 
written with that intention.

Thanks again.



signature.asc
Description: This is a digitally signed message part.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] The way things used to work...

2009-02-16 Thread Charles Marcus
On 2/16/2009 7:31 AM, Dragan Lukic wrote:
> Can anyone help me?
> 
> I cannot imagine why is my question so hard 
> 
> Looks like I will have to make at least one post to this thread each day 
> until 
> I finally get a reply/solution.

Doing that will likely get you totally ignored by most everyone here...
being 'in your face' is not generally a good idea when it comes to free
support for free software.

> 123 days with no solution, well my patience is getting thin... 

I've seen at least 2 or 3 responses with suggestions to your LAST rant,
but no response from YOU.

> Please help me get this working in new samba

There is paid support available, and it sounds like this is what you
really want:

http://us1.samba.org/samba/support/

-- 

Best regards,

Charles
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] The way things used to work...

2009-02-16 Thread Volker Lendecke
On Mon, Feb 16, 2009 at 01:31:51PM +0100, Dragan Lukic wrote:
> I cannot imagine why is my question so hard 
> 
> Looks like I will have to make at least one post to this
> thread each day until I finally get a reply/solution.
> 
> 123 days with no solution, well my patience is getting thin... 

If nobody helps you voluntarily, you might want to look for
paid support under http://www.samba.org/samba/support/.

Volker


pgptrSGDUHYQO.pgp
Description: PGP signature
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] The way things used to work...

2009-02-16 Thread Dragan Lukic
Can anyone help me?

I cannot imagine why is my question so hard 

Looks like I will have to make at least one post to this thread each day until 
I finally get a reply/solution.

123 days with no solution, well my patience is getting thin... 

Please help me get this working in new samba

> - need share level of security
> - need forcing of user who access that share
> - need forcing of file/directory create mask
> Goal: Allowing network (windows and linux) users (as well as local user) to
> access defined share via samba (and local user also via file manager),
> without any user/password prompt, and with granting 755 permissions
> on all files/directories under that share and with ownership of local
> user/group.
> Of course, shared directory exists, it has permissions set up accordingly,
> and local user also exists, and have those permissions.
> All these rules are matched with following smb.conf (real entries are
> replaced with foo/bar) and it is working on 3.0.25b and 3.0.28a versions of
> samba on mandriva 2008.0 and 2008.1.
> Again, same ruleset IS NOT working on samba 3.2.3 on Mandriva 2009.0.
> (samba- server-3.2.3-3mdv2009.0)
>
> [global]                                                    
>     workgroup = FOO
>     server string = FOO Server
>     security = share
>     hosts allow = 192.168.125. 127.0.
>     log file = /var/log/samba/%m.log
>     max log size = 50
>     local master = no
>     os level = 33
>     dns proxy = no
> #  Share Definitions ===
> [Share]
>     path = /home/foobar/Documents/Share/
>     public = yes
>     force user = foobar
>     force group = foobar
>     create mask = 0755
>     force create mode = 0755
>     directory mask = 0755
>     force directory mode = 0755
>     writable = yes
>     printable = no
>
>
> In short, I want to use this config file above, and it just has to work as
> explained.
>
> Please, can someone finally help me resolve this?
>
> DraxNS



signature.asc
Description: This is a digitally signed message part.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] The way things used to work...

2009-02-12 Thread J. Pilfold-Bagwell
Try changing "force group = foobar" to "force group = DOMAIN\foobar" .

The way Samba handles groups was changed (it was in the release notes
around 3.0.28) and if you use read list and write list in smb.conf,
users are now specified using DOMAIN\username and groups using +DOMAIN
\groupname instead of the old @groupname . This way, you can specify
permissions for multiple NT domains.


Example from my smb.conf:

[resources]
comment = Open Share for Distribution
path = /share/resources
browseable = yes
writeable = yes
read list = +"BGS\Domain Admins" +BGS\staff +BGS\visitors +"BGS\Domain
Users"
write list = +"BGS\Domain Admins" +"BGS\staff"
create mask = 440
directory mask = 770

I believe that you now also have to be a member of a group for force
group =  to work so everyone who creates a file in the share will have
to be in group DOMAIN\foobar It may be that something's changed in v 3.2
(MS keeps moving the target) so check the release notes again if it
doesn't work.

Good Luck,

Jools




On Wed, 2009-02-11 at 21:22 +, Dragan Lukic wrote:
> email message attachment
> >  Forwarded Message 
> > Subject: 
> > Date: Thu, 12 Feb 2009 08:29:22 -
> > 

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] The way things used to work...

2009-02-11 Thread Dragan Lukic
I am fascinated!! 68 day from my last post, and 1142 more posts STILL 
no reply with even hint of solution 
In total 117 days and 1915 messages Nice score respectable.

And what I want?? 

This:
- need share level of security
- need forcing of user who access that share
- need forcing of file/directory create mask
Goal: Allowing network (windows and linux) users (as well as local user) to 
access defined share via samba (and local user also via file manager), without 
any user/password prompt, and with granting 755 permissions 
on all files/directories under that share and with ownership of local 
user/group.
Of course, shared directory exists, it has permissions set up accordingly, and 
local user also exists, and have those permissions.
All these rules are matched with following smb.conf (real entries are replaced 
with foo/bar) and it is working on 3.0.25b and 3.0.28a versions of samba on 
mandriva 2008.0 and 2008.1.
Again, same ruleset IS NOT working on samba 3.2.3 on Mandriva 2009.0. (samba-
server-3.2.3-3mdv2009.0)

[global]                                                    
    workgroup = FOO
    server string = FOO Server
    security = share
    hosts allow = 192.168.125. 127.0.
    log file = /var/log/samba/%m.log
    max log size = 50
    local master = no
    os level = 33
    dns proxy = no
#  Share Definitions ===
[Share]
    path = /home/foobar/Documents/Share/
    public = yes
    force user = foobar
    force group = foobar
    create mask = 0755
    force create mode = 0755
    directory mask = 0755
    force directory mode = 0755
    writable = yes
    printable = no


In short, I want to use this config file above, and it just has to work as 
explained.

Please, can someone finally help me resolve this?

DraxNS


signature.asc
Description: This is a digitally signed message part.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] The way things used to work...

2008-12-05 Thread Dragan Lukic
Again... to confirm that I do understand:

[global]
workgroup = FOO
server string = FOO Server
security = user
map to guest = Bad Password
hosts allow = 192.168.125. 127.0.
log file = /var/log/samba/%m.log
max log size = 50
local master = no
os level = 33
dns proxy = no
#  Share Definitions ===
[Share]
path = /home/foobar/Documents/Share/
public = yes
force user = foobar
force group = foobar
create mask = 0755
force create mode = 0755
directory mask = 0755
force directory mode = 0755
writable = yes
printable = no


On Friday 05 December 2008 23:07:13 Jeremy Allison wrote:
> On Fri, Dec 05, 2008 at 11:02:37PM +0100, Dragan Lukic wrote:
> > Let me see if I understand
> >
> > In my smb.conf things should look like this:
> >
> > [global]
> > workgroup = FOO
> > server string = FOO Server
> > security = user
> > map to guest = Bad Password
> > hosts allow = 192.168.125. 127.0.
> > log file = /var/log/samba/%m.log
> > max log size = 50
> > local master = no
> > os level = 33
> > dns proxy = no
> > #  Share Definitions ===
> > [Share]
> > path = /home/foobar/Documents/Share/
> > public = yes
> > writable = yes
> > printable = no
> >
> > and ALL users (remote and LOCAL) will have full rigths on shared
> > directory and it's contents???
> >
> > With my current smb.conf, whoever pastes file into shared dir creates it
> > as local user, so later on local user can edit or do whatever he/she
> > wants on pasted file.
> > Talking in permissions, pasted files are created as localuser:localuser
> > rwxr- xr-x, and if I just leave guest OK and user leves security, files
> > are created as nobody:nogroup, and that is exactly what I DO NOT WANT!
>
> Use force user on the share.
>
> Jeremy.



signature.asc
Description: This is a digitally signed message part.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: [Samba] The way things used to work...

2008-12-05 Thread Jeremy Allison
On Fri, Dec 05, 2008 at 11:02:37PM +0100, Dragan Lukic wrote:
> Let me see if I understand
> 
> In my smb.conf things should look like this:
> 
> [global]
> workgroup = FOO
> server string = FOO Server
> security = user
> map to guest = Bad Password
> hosts allow = 192.168.125. 127.0.
> log file = /var/log/samba/%m.log
> max log size = 50
> local master = no
> os level = 33
> dns proxy = no
> #  Share Definitions ===
> [Share]
> path = /home/foobar/Documents/Share/
> public = yes
> writable = yes
> printable = no
> 
> and ALL users (remote and LOCAL) will have full rigths on shared directory 
> and 
> it's contents???
> 
> With my current smb.conf, whoever pastes file into shared dir creates it as 
> local user, so later on local user can edit or do whatever he/she wants on 
> pasted file. 
> Talking in permissions, pasted files are created as localuser:localuser rwxr-
> xr-x, and if I just leave guest OK and user leves security, files are created 
> as nobody:nogroup, and that is exactly what I DO NOT WANT!

Use force user on the share.

Jeremy.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] The way things used to work...

2008-12-05 Thread Dragan Lukic
Let me see if I understand

In my smb.conf things should look like this:

[global]
workgroup = FOO
server string = FOO Server
security = user
map to guest = Bad Password
hosts allow = 192.168.125. 127.0.
log file = /var/log/samba/%m.log
max log size = 50
local master = no
os level = 33
dns proxy = no
#  Share Definitions ===
[Share]
path = /home/foobar/Documents/Share/
public = yes
writable = yes
printable = no

and ALL users (remote and LOCAL) will have full rigths on shared directory and 
it's contents???

With my current smb.conf, whoever pastes file into shared dir creates it as 
local user, so later on local user can edit or do whatever he/she wants on 
pasted file. 
Talking in permissions, pasted files are created as localuser:localuser rwxr-
xr-x, and if I just leave guest OK and user leves security, files are created 
as nobody:nogroup, and that is exactly what I DO NOT WANT!



On Friday 05 December 2008 22:40:28 Jeremy Allison wrote:
> On Fri, Dec 05, 2008 at 10:36:20PM +0100, Dragan Lukic wrote:
> > > Looks like I just want impossible: simple share with no limits, but
> > > with local user permissions for remote users. And NO I do not wish to
> > > use user level security, as users that have to use those shares hardly
> > > can cope with more basic stuff, than it is login to someone else's
> > > share via username&password.
>
> Then you're misunderstanding user level security.
> Use :
>
> map to guest = Bad  Password
>
> to get the same effect.
>
> Jeremy.



signature.asc
Description: This is a digitally signed message part.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: [Samba] The way things used to work...

2008-12-05 Thread Jeremy Allison
On Fri, Dec 05, 2008 at 10:36:20PM +0100, Dragan Lukic wrote:
> > Looks like I just want impossible: simple share with no limits, but with
> > local user permissions for remote users. And NO I do not wish to use user
> > level security, as users that have to use those shares hardly can cope with
> > more basic stuff, than it is login to someone else's share via
> > username&password.

Then you're misunderstanding user level security.
Use :

map to guest = Bad  Password

to get the same effect.

Jeremy.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] The way things used to work...

2008-12-05 Thread Dragan Lukic
Again. 22 more days and 388 more messages later... STILL no answer to my 
(simple) request?

To to be brief:
- need share level of security
- need forcing of user who access that share
- need forcing of file/directory create mask
Goal: Allowing network users (as well as local user) to access defined share 
via samba, without any user/password prompt, and with granting 755 permissions 
on all files/directories under that share and with ownership of local 
user/group.
Of course, shared directory exists, it has permissions set up accordingly, and 
local user also exists, and have those permissions.
All these rules are matched with following smb.conf (real entries are replaced 
with foo/bar) and it is working on 3.0.25b and 3.0.28a versions of samba on 
mandriva 2008.0 and 2008.1.
Again, same ruleset IS NOT working on samba 3.2.3 on Mandriva 2009.0. (samba-
server-3.2.3-3mdv2009.0)

[global]                                                    
    workgroup = FOO
    server string = FOO Server
    security = share
    hosts allow = 192.168.125. 127.0.
    log file = /var/log/samba/%m.log
    max log size = 50
    local master = no
    os level = 33
    dns proxy = no
#  Share Definitions ===
[Share]
    path = /home/foobar/Documents/Share/
    public = yes
    force user = foobar
    force group = foobar
    create mask = 0755
    force create mode = 0755
    directory mask = 0755
    force directory mode = 0755
    writable = yes
    printable = no


On Thursday 13 November 2008 23:37:49 Dragan Lukic wrote:
> So, 18 days and 375 posts later. no answer to my question?
>
> Looks like I just want impossible: simple share with no limits, but with
> local user permissions for remote users. And NO I do not wish to use user
> level security, as users that have to use those shares hardly can cope with
> more basic stuff, than it is login to someone else's share via
> username&password.
>
> Anyhow, in my previous post I have presented my non working (only on samba
> 3.2.3) smb.conf and I need help in getting it to work (again on samba 3.2.3
> or later). I hope that conf is self explanatory, but if it is not, please
> ask me and I will clarify.
>
> Thanks.
>

> DraxNS



signature.asc
Description: This is a digitally signed message part.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: [Samba] The way things used to work...

2008-11-18 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dragan Lukic wrote:
> So, 18 days and 375 posts later. no answer to my question?
> 
> Looks like I just want impossible: simple share with no limits, but with 
> local 
> user permissions for remote users. And NO I do not wish to use user level 
> security, as users that have to use those shares hardly can cope with more 
> basic stuff, than it is login to someone else's share via username&password.
> 
> Anyhow, in my previous post I have presented my non working (only on samba 
> 3.2.3) smb.conf and I need help in getting it to work (again on samba 3.2.3 
> or 
> later). I hope that conf is self explanatory, but if it is not, please ask me 
> and I will clarify.


Hey Dragan,

You mail is a little hard for me to follow.  Can you explain in about 2 - 3
sentences what you want to do ?




cheers, jerry
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJIsyMIR7qMdg1EfYRAqQjAKDDy6TeChvZTw9DgdcQNYl6rA+qpACfVbAF
gUrFYK5J8JdC47JnHDEWPzU=
=rIr1
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] The way things used to work...

2008-11-13 Thread Dragan Lukic
So, 18 days and 375 posts later. no answer to my question?

Looks like I just want impossible: simple share with no limits, but with local 
user permissions for remote users. And NO I do not wish to use user level 
security, as users that have to use those shares hardly can cope with more 
basic stuff, than it is login to someone else's share via username&password.

Anyhow, in my previous post I have presented my non working (only on samba 
3.2.3) smb.conf and I need help in getting it to work (again on samba 3.2.3 or 
later). I hope that conf is self explanatory, but if it is not, please ask me 
and I will clarify.

Thanks.





On Monday 27 October 2008 22:59:00 Dragan Lukic wrote:
> Hello all,
>
> As I was instructed on #samba IRC channel, I will start new discussion
> here, about samba and a way it works.
>
> I might call myself an experienced Linux user, and self thought admin, so
> things in Linux are not so new to me, but lacking proper (certified)
> education, I still tend to roam around issues with trial&error method.
>
> Regarding samba, it is translated in my attempt to make things go my way,
> rather than (someone might call it) right way.
>
> Since I work as sysadmin, surrounded with mostly computer illiterate users,
> my primary goal is to make things effortless to them... (brainless is
> better word...), and since it is mixed environment (windows&linux), and of
> course all they ever saw before is windows you can understand a nature
> of limitations that are in front of me.
>
> It took me some time (again trial and error) to compile set of rules for
> smb.conf that makes things exactly as I want. Efficient and nice.
> This smb.conf is working for me for more than a year now, and is still
> working at workplace, but I hit a brick wall trying to use it at home.
>
> At work, idea is like so:
> Linux user has it's home dir
> inside there is Documents dir
> inside that I will make shared dir
> it will be published via Samba
> it will available for read and write to all
> this includes local user via Samba and via local access
> for ownership issues, all files will be forced to create under local user
> and group mask
> not to forget, it is only workgroup, not domain or any other level of
> network organisation
>
> All these rules are matched with following smb.conf (real entries will be
> changed with foo/bar)
>
> [global]
> workgroup = FOO
> server string = FOO Server
> security = share
> hosts allow = 192.168.125. 127.0.
> log file = /var/log/samba/%m.log
> max log size = 50
> local master = no
> os level = 33
> dns proxy = no
>
> #  Share Definitions ===
> [Share]
> path = /home/foobar/Documents/Share/
> public = yes
> force user = foobar
> force group = foobar
> create mask = 0755
> force create mode = 0755
> directory mask = 0755
> force directory mode = 0755
> writable = yes
> printable = no
>
> Of course directory /home/foobar/Documents/Share/ exists, and is set up
> with 755 for user foobar and group foobar (as well as all inside contents).
>
> Doing so, whoever puts something inside this dir via samba, creates that
> file/folder with foobar:foobar ownership and 755 set of permissions. Which
> is exactly what I wanted. Of course, no username&password dialogue is
> needed, so my main goal of things being effortless for users is also met.
>
> So, this works in network of mostly Windows XP-s, Mandriva 2008, and few
> Mandriva 2008.1 machines (including router/mail server). So samba versions
> in use are 3.0.25b and 3.0.28a (maybe some updated, but not important for
> issue).
>
> It was also working at home, where I have desktop (that plays also router)
> and laptop connected via wlan to desktop. Recently newest Mandriva was
> released, so I decided to give it a go. After struggling with bunch of
> other issues, time came to quickly enable samba share so I can move files
> from laptop to desktop (where new Mandriva 2009 is installed). Easy job...
> oh how wrong was I...
>
> Installed samba client and server packages made a backup of stock
> smb.conf and copied "old" smb.conf file. Called smb://home in Dolphin and
> was surprised... no workgroups found!! Well after some period of time (and
> several smb restarts) finally I got smb://home to show share...
> Now to enter it... errr NO
> Again few restarts and lot of time later... OK... I see contents of
> smb://home and can enter... good... let's see what is inside...
> Nothing
> Or to be exact, message is: The file or folder smb://hostname/Share does
> not exist
>
> Of course it exists, all was done and set up exactly as at work... and set
> up that way it was working PRIOR latest samba installed... and at this time
> it is: samba-server-3.2.3-3mdv2009.0 (with other dependent files)
>
> So now... I was advised to use security level set to user, and to allow
> guest user... and I did that... After lot of trials (this time r

[Samba] The way things used to work...

2008-10-27 Thread Dragan Lukic
Hello all,

As I was instructed on #samba IRC channel, I will start new discussion here, 
about samba and a way it works.

I might call myself an experienced Linux user, and self thought admin, so 
things in Linux are not so new to me, but lacking proper (certified) 
education, I still tend to roam around issues with trial&error method.

Regarding samba, it is translated in my attempt to make things go my way, 
rather than (someone might call it) right way.

Since I work as sysadmin, surrounded with mostly computer illiterate users, my 
primary goal is to make things effortless to them... (brainless is better 
word...), and since it is mixed environment (windows&linux), and of course all 
they ever saw before is windows you can understand a nature of limitations 
that are in front of me.

It took me some time (again trial and error) to compile set of rules for 
smb.conf that makes things exactly as I want. Efficient and nice.
This smb.conf is working for me for more than a year now, and is still working 
at workplace, but I hit a brick wall trying to use it at home.

At work, idea is like so:
Linux user has it's home dir
inside there is Documents dir
inside that I will make shared dir
it will be published via Samba
it will available for read and write to all
this includes local user via Samba and via local access
for ownership issues, all files will be forced to create under local user and 
group mask
not to forget, it is only workgroup, not domain or any other level of network 
organisation

All these rules are matched with following smb.conf (real entries will be 
changed with foo/bar)

[global]
workgroup = FOO
server string = FOO Server
security = share
hosts allow = 192.168.125. 127.0.
log file = /var/log/samba/%m.log
max log size = 50
local master = no
os level = 33
dns proxy = no

#  Share Definitions ===
[Share]
path = /home/foobar/Documents/Share/
public = yes
force user = foobar
force group = foobar
create mask = 0755
force create mode = 0755
directory mask = 0755
force directory mode = 0755
writable = yes
printable = no

Of course directory /home/foobar/Documents/Share/ exists, and is set up with 
755 for user foobar and group foobar (as well as all inside contents).

Doing so, whoever puts something inside this dir via samba, creates that 
file/folder with foobar:foobar ownership and 755 set of permissions. Which is 
exactly what I wanted. Of course, no username&password dialogue is needed, so 
my main goal of things being effortless for users is also met.

So, this works in network of mostly Windows XP-s, Mandriva 2008, and few 
Mandriva 2008.1 machines (including router/mail server). So samba versions in 
use are 3.0.25b and 3.0.28a (maybe some updated, but not important for issue).

It was also working at home, where I have desktop (that plays also router) and 
laptop connected via wlan to desktop. Recently newest Mandriva was released, 
so I decided to give it a go. After struggling with bunch of other issues, 
time came to quickly enable samba share so I can move files from laptop to 
desktop (where new Mandriva 2009 is installed). Easy job... oh how wrong was 
I...

Installed samba client and server packages made a backup of stock smb.conf 
and copied "old" smb.conf file. Called smb://home in Dolphin and was 
surprised... no workgroups found!! Well after some period of time (and several 
smb restarts) finally I got smb://home to show share... 
Now to enter it... errr NO
Again few restarts and lot of time later... OK... I see contents of smb://home 
and can enter... good... let's see what is inside... 
Nothing
Or to be exact, message is: The file or folder smb://hostname/Share does not 
exist

Of course it exists, all was done and set up exactly as at work... and set up 
that way it was working PRIOR latest samba installed... and at this time it 
is: samba-server-3.2.3-3mdv2009.0 (with other dependent files)

So now... I was advised to use security level set to user, and to allow guest 
user... and I did that... After lot of trials (this time refreshed via 
smbcontrol smbd reload-config) it finally got me where I want to be, with 
exclusion of all files written via samba are now owned by nobody:nogroup so it 
needs to be chowned to local user to be useful.

I am not happy with this solution and I do not use it.

Getting here took me ~3 days of reading (in fast forward mode) several 
official samba pages, numerous forums, asking around irc channels etc...

I was unpleasantly surprised with official samba examples that are not 
working, like this one here:
http://us1.samba.org/samba/docs/man/Samba-HOWTO-
Collection/FastStart.html#anon-rw

Followed it by the letter (except names) and in return got same error as 
above.

Also another quite frustrating thing... TIME.. time for new set of rules from 
smb.conf to take effect