Re: [Samba] Samba 3.4.2 with Solaris ZFS Snaphots

2009-12-03 Thread Ed Plese
On Wed, Dec 2, 2009 at 3:13 AM, Ralf Hornik Mailings
 wrote:
> Ed Plese  wrote:
>> What patches are currently pending?  Do any of them eliminate the need
>> for some of the ZFS patches?
>
> Obviously none. The patches from http://www.edplese.com/samba-with-zfs.html
> do actually work with some modifications. But with 3.5 after compiling well
> the module doesn't work at all, and breaks folder sharing:
>
> [2009/12/01 14:14:55.967820,  0] smbd/service.c:1009(make_connection_snum)
>  '/data/daten' is not a directory, when connecting to [Daten]
>
>> Has anyone else started merging these patches to the shadow_copy2
>> module?  If not, I'll get started with it.
>
> Is there any documentation about this modules (resp. shadow_copy2) ? I need
> some hints how to configure e.g. the location of the snapdir, format, ...
> Regards

Yesterday, I posted a patch to the samba-technical list that works
with the shadow_copy2 module in Samba 3.4.3.  It's also available
here:

http://www.edplese.com/blog/2009/12/02/samba-shadow_copy2-enhancements/

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


Re: [Samba] Samba 3.4.2 with Solaris ZFS Snaphots

2009-12-01 Thread Ed Plese
Hi,

Sorry for the lack of proper threading, but I wasn't subscribed to the
list at the time.

On Nov 26, 2009, Jeremy Allison wrote:
> On Wed, Nov 18, 2009 at 08:09:16PM +0100, Volker Lendecke wrote:
> > On Wed, Nov 18, 2009 at 11:05:07AM -0800, Jeremy Allison wrote:
> > > > We are extensively using ZFS snapshots with samba, it works like a 
> > > > charm.
> > > >
> > > > We use the patches from http://www.edplese.com/samba-with-zfs.html
> > > > this give us freedom in naming convention
> > > > they still can be applied (manuallly) to 
> > > > samba-3.4.x/source3/modules/vfs_shadow_copy.c
> > >
> > > Hmmm - these patches look really interesting ! I wonder
> > > how they didn't get added into mainline source code
> >
> > Maybe because nobody wants to touch the shadow_copy module?
> > shadow_copy2 is the one that has seen fixes lately, I have
> > some patches for shadow_copy2 that are still pending to be
> > merged upstream.

What patches are currently pending?  Do any of them eliminate the need
for some of the ZFS patches?

> Ah ok, didn't realize the difference between the two.
> Maybe we should remove the vfs_shadow_copy and concentrate
> everything on vfs_shadow_copy2 (and look at merging these
> patches).

Has anyone else started merging these patches to the shadow_copy2
module?  If not, I'll get started with it.


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


Re: [Samba] ZFS shadow copy patches

2008-04-05 Thread Ed Plese
On Fri, Apr 4, 2008 at 8:18 PM, Paul B. Henson <[EMAIL PROTECTED]> wrote:
>  I was wondering if there was any news on the patches proposed by Ed Plese
>  last year regarding updates for shadow copies to be better compatible with
>  Solaris ZFS:

Despite having only few minor changes to make to the patches, various
circumstances delayed the process and I never got back to it to get it
finished up and resubmitted for inclusion.  I finished this up tonight
and sent it off to the developer that had previously reviewed the
patches.

There's a new shadow_copy2 module in Samba 3.2 that has much of the
functionality of the enhancements I'd been working on for the existing
shadow copy module.


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


Re: [Samba] Group Polic Software Install Packages located on SAMBA share

2007-12-03 Thread Ed Plese
On 11/29/07, Michael Melia Jr. <[EMAIL PROTECTED]> wrote:
> I am running debian etch and samba 3.0.24.  I have it configured to for
> krb5, winbind, and ads.  Everything is working perfect as far as
> accessing shares, authentication using AD logins.  I have one issue.  I
> have some computer group policies on my AD server to do various software
> installs. The msi and files themselves are hosted on a share on my samba
> server.  The software installs happen when windows is first loading
> before the login prompt is presented and the user logs in.  The software
> installs always fail saying it cannot access the files.  My thoughts are
> that since the user has not logged in yet, that the samba server doesn't
> not how to authenticate the machine to access to files.  Has anyone had
> experience with this issues?  Anyone installed software through group
> policy and hosting that msi's on a samba share?   Any help would be
> greatly appreciated.

The software is installed under the context of the SYSTEM account
(i.e. the computer account) on the workstations.  Make sure that the
Domain Computers domain group (or some other group containing the
computer accounts) has permission to access both the share and the
files.

The Samba log files are a good resource to check for any errors as to
why the computer accounts aren't able to access the files.  An easy
way to start up cmd.exe running as the SYSTEM account to use for
troubleshooting and testing permissions is with the AT command:

C:\>at HH:MM /interactive cmd.exe

where HH:MM is the current time plus 1 minute in 24 hour notation.


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


[Samba] Winbind deadlock with AD and nss

2007-08-26 Thread Ed Plese
Hi,

I'm testing out Samba 3.0.25c with Active Directory using the rid
idmap backend.  In certain cases there seems to be a repeatable
deadlock in winbind.

I have a local user "ed" created with uid 100 and no user exists with
uid 1001.  Here's the behavior I'm seeing with wbinfo:

# time wbinfo -U 100
S-1-22-1-100

real0m0.047s
user0m0.014s
sys 0m0.007s

# time wbinfo -U 1001
S-1-22-1-1001

real5m35.097s
user0m0.015s
sys 0m0.011s

The first command behaves as expected but the expected result of the
second command is "Could not convert uid 1001 to sid" with an
execution time of much less than 1 second as is seen with Samba 3.0.24
and lower.

This is running on Solaris 10 (x86) and compiled with Sun Studio 11
using the OpenLDAP and MIT Kerberos 5 libraries from Blastwave.  The
exact same configuration works fine with 3.0.24 with the only
difference being the idmap configuration changes between 3.0.24 and
3.0.25.

In /etc/nsswitch.conf I have:
passwd: files winbind
group:  files winbind

During the query to winbindd, uid 1001 is not within the range used
for the MYAD rid backend which causes the lookup to then be attempted
by passdb.  passdb in turn calls getpwuid which ends up querying
winbind through nss_winbind which is what leads to the deadlock.

When I remove winbind from nsswitch.conf the 5 minute delay is gone
but wbinfo returns "S-1-22-1-1001" which is different from what
previous Samba versions returned.

Here's the contents smb.conf:
[global]
  workgroup = MYAD
  realm = MYAD.ORG
  security = ads
  encrypt passwords = yes
  smb passwd file = /etc/samba/private/smbpasswd
  winbind separator = +
  winbind use default domain = yes
  winbind nested groups = no
  obey pam restrictions = yes
  winbind enum users = yes
  winbind enum groups = yes
  allow trusted domains = no
  idmap uid = 1-1
  idmap gid = 1-1
  idmap domains = MYAD
  idmap config MYAD: default = yes
  idmap config MYAD: backend = rid
  idmap config MYAD: range = 1-1
  idmap config MYAD: readonly = yes
  name resolve order = host
  dns proxy = no

In Samba versions prior to 3.0.25 the idmap options in smb.conf were:
   idmap uid = 1-1
   idmap gid = 1-1
   idmap backend = idmap_rid:MYAD=1-1

Is there something wrong with my new idmap configuration or is this a
bug?  3.0.25 implicitly adds the passdb backend which I don't think
older versions did.  Disabling this might fix the problem but is there
any way to do that?  Any other ideas on things to try?

Thanks,

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


Re: [Samba] Samba, Winbind and Active Directory

2007-08-24 Thread Ed Plese
On 8/23/07, Kevin Gutch <[EMAIL PROTECTED]> wrote:
> I am trying to set up Samba joining Active Directory. I have done this
> successfully before and have most of my previous files.
>
> Here is the issue I am seeing.
>
> I can  "kinit [EMAIL PROTECTED]"
>
> I cannot "net ads join -U administrator"
>
> I get thus message: "Failed to join domain: Invalid credentials"

I was seeing this same behavior.  Joining the domain as a different user
in the Domain Admins group worked fine though.  Once joined the
adminisitrator user was able to access the shares as normal.


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


Re: [Samba] vfs_shadow and [homes]

2007-03-02 Thread Ed Plese
On Fri, Mar 02, 2007 at 11:44:32AM -0600, James A. Dinkel wrote:
> Yeah, I'll be anxiously awaiting your improvements, too.  We also have about 
> 500 users and creating all those symlinks, plus keeping on top of creating 
> the symlinks for new users would be impossible.  All those symlinks would 
> also need to added to my snapshot scripts.
> 
> I might also mention, there is a problem with shadow_copy when mapping a 
> drive to a subfolder of the share...  You must create symlinks in the 
> subfolders, which has been doable for our commonly used drive mappings, but 
> it's cumbersome.  A more elegant solution would be appreciated :)

I agree this would be very helpful.  I'll have to check how the shadow
copies behave in that situation.


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


Re: [Samba] vfs_shadow and [homes]

2007-03-01 Thread Ed Plese
On Thu, Mar 01, 2007 at 12:35:12PM -0600, James A. Dinkel wrote:
> > i was able to successfully run vfs_shadow on a samba share with win xp
> > shadow copy client. but i think it?s currently not implemented that one
> > could export [homes] with this vfs object, because AFAIK each @GMT-snap
> > has to resist directly under the samba share. but [homes] is a virtual
> > share representing different shares (depending on users).
> > 
> > has anybody hints about using vfs_shadow with [homes]?

> I would like to find a good answer to this myself.  For now, my solution has 
> been to share the root of all the homes shares and give access to 
> administrators only.  For instance, all my homes are under /export/homes/ and 
> then a folder for each user.  I share the /export/homes folder and there is a 
> @GMT- symlink in there to the snapshot.  This way at least administrators can 
> access that share and use the Previous Versions Client to retrieve files.
> 
> My solution does not allow users to retrieve their own files though, which I 
> would like for it to do.

As it is now, you can get this to work by creating symlinks to the
snapshots under each user's home directory.  So for each snapshot and
user do something like:

# ls -s /mnt/snapshots/snap1/user1 /home/user1/@GMT-2003.08.05-12.00.00

This gets a bit cumbersome with large numbers of users and snapshots.
I've working on some enhancements to the shadow_copy module to address
this.


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


Re: [Samba] Tips/hints for Windows network management

2007-02-21 Thread Ed Plese
On Tue, Feb 20, 2007 at 04:02:21PM +, Dave Ewart wrote:
> This is what I *don't* have figured out.  I basically need to find out
> whether any of this is possible and, if so, whether it is possible using
> my existing toolset:
> 
> - Updating and managing settings that I originally set via
>   gpedit.msc on the reference PC: this is (2) above.  I cannot
>   change these settings once I've deployed the PC live, whereas for
>   settings in (1) above, I can do this via the appropriate System 
>   Policy change.  (Basically, if I understand the Windows-terminology 
>   correctly, I have instituted Local Group Policy rather than 'real'
>   Group Policy?)

If you're up for some lower level methods and roll-your-own type
solutions, you may find the following helpful.  I use this method to
supplement the usual Active Directory Group Policies for cases where
Group Policies don't work for one reason or another.  For example, it
can be used to apply user policies based on the machine that is logged
into which can't normally be done.

With a few exceptions, all Group Policies actually do are make specific,
documented changes to the registry in either the HKEY_LOCAL_MACHINE (for
computer/machine policies) or HKEY_CURRENT_USER (for user policies) registry
hives.

The documentation for all of the Group Policies is found in the
C:\Windows\inf\*.adm files.  Once you familiarize yourself with the file
format you can find out exactly what registry values are set to enable
certain Group Policies.

After you determine what registry values need to be set you can deploy
those changes using various methods:

 * Create a script (JavaScript, VBScript, Python if you have it
   installed on the PCs, etc.) that sets the appropriate values in
   the registry.  When done in a script you have the flexibility to
   conditionally apply changes.

 * Create a REG file with the changes and then create a script that
   imports the registry file using reg.exe.

For computer/machine policies, set the script to run when the computer
boots up.  For user policies, run the script during the login script so
that it runs as the logged in user.

It's not a point and click method like Active Directory Group Policies
but it can be used to accomplish the same thing.


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


Re: [Samba] Samba on opensolaris's ZFS

2007-02-06 Thread Ed Plese
On Tue, Feb 06, 2007 at 04:43:35PM +0100, Koen Smeets wrote:
> Does anybody have first-hand experience on running Samba off of Sun's ZFS? 
> I am specifically looking for compatibility between the two and performance 
> of the combo.

I haven't used it yet for any high load applications, but Samba runs just
fine on Solaris with ZFS.  Currently the main missing feature in Samba
with regards to ZFS is support for ZFS ACLs.  It will respect the ACLs
that are set from Solaris, but they can't be viewed or set from a Windows
client.  Work is currently underway to implement this feature though:

http://lists.samba.org/archive/samba-technical/2007-January/051123.html

I can't speak much for performance since I haven't specifically tested that
aspect, but it seems at least on par with other filesystems.

> The reason I am looking into this is I find ZFS features of in snapshotting 
> etc. very attractive.

I found the snapshots quite attractive as well.  I wrote up a short page
on some fun things you can do with ZFS and Samba:

http://www.edplese.com/samba-with-zfs.html

The last item on the page is a VFS module I put together that makes
Samba's shadow copy features work very nicely with ZFS snapshots.
Consider the module "experimental" at the moment since I haven't
actually used it in production yet.


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


Re: [Samba] ntuser.dat

2007-02-06 Thread Ed Plese
On Tue, Feb 06, 2007 at 01:42:07PM -0600, Keith Lynn wrote:
> What are the implications of locking the ntuser.dat file on the user's 
> server profile? That is, if I make the ntuser.dat file read-only, what 
> affects will that have on the client?

When a user logs in and doesn't have a local profile already on the
machine, Windows will copy the ntuser.dat file as part of the initial
profile that is used for the user.  Once copied to the client machine,
the ntuser.dat is then writable.  In most (and likely almost all) cases,
the ntuser.dat is already read-only on the server because you don't
want a user to modify the default profile for every new user.

That being said, I'm guessing that it's not even possible to load a
registry hive (in this case ntuser.dat) as read-only in Windows.

If your goal is to try to prevent modifications to the user profile,
what I've found works quite well is the following:

 1. Set it up to pull the default profile from the server when a user logs
in (this is usually the default if roaming profiles aren't setup).
 2. Run a script every time the client starts up to delete every local user
profile (everything in C:\Documents and Settings except for certain
system user profiles).
 3. Automatically shut down computers at night to enforce that the
script to delete the profiles runs at least daily, plus it saves power.

Obviously there are tradeoffs with this method but I find it to work
exceedingly well.  Users can still make changes to the settings which
are not locked out by Group Policies but they are completely restored
to their defaults every time the computer is restarted.


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


Re: [Samba] Machine account in Users home

2007-01-18 Thread Ed Plese
On Wed, Jan 17, 2007 at 06:23:19PM -0500, M Azer wrote:
> Hello, Am i suppose to see win machine names in users home? they are created
> when users login using their workstations
> here is my home directory
> 
> [EMAIL PROTECTED] CAD]$ ls -l
> total 20
> drwx-- 3 ad01$ Domain Computers   4096 Jan 17 17:57 ad01_
> drwx-- 3 administrator   Domain Users   4096 Jan 17 17:59
> administrator
> drwx-- 3 cat  Domain Users   4096 Jan 17 18:07 cat
> drwx-- 4 mina.azer   Domain Users   4096 Jan 17 17:57 mina.azer
> drwx-- 3 vdc2$
> 
> as u can see the first and last item are machine accounts .. is that right??

If your users only connect to the server through Samba then you can
utilize the "root preexec" option to run a script as root when a user
connects to the share.

In this script you can create the directory if it does not exist, set
permissions, set quotas, etc.  More applicable to your question though
is that you can create the directory only if it's not for a machine
account (i.e. create it if it doesn't end with an "_").  

The script would look something like:


#!/bin/bash
USERNAME=$1
LOGFILE=/var/log/mkhomedir.log
HOME_PATH=/home/MYDOMAIN

echo $USERNAME | egrep -q "[^_]$"
if [ $? -ne 0 ]; then
  # ends with _ so just exit
  echo "not creating directory for $USERNAME" >> $LOGFILE
  exit 1
fi

if [ ! -d "$HOME_PATH/$USERNAME" ]; then
  mkdir "$HOME_PATH/$USERNAME"
  chown "$USERNAME" "$HOME_PATH/$USERNAME"
fi


When I've used this method I would modify the regular expression to only
match our specific naming pattern for usernames.  So for example it
would be something like "[a-z]+[0-9]*" instead of "[^_]$", but this obviously
varies from site to site.

Also, you'd probably want to add additional error checking and logging.
Remember that this runs as root so you really want to be careful with
what you're doing.

Once you have the script made up you can set it in smb.conf to be called when
someone connects to their home directory:

[homes]
  root preexec = /etc/samba/mkhomedir.sh '%U'

The %U represents the username but if you have more than one domain you
might want to use %D as well to pass the domain to the script too.  See
the smb.conf manpage for all other variables.


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


Re: [Samba] Auto Create user home directory

2007-01-15 Thread Ed Plese
On Mon, Jan 15, 2007 at 12:11:29PM -0500, M Azer wrote:
> now that all permissions are right - if i create a new user on the win 2003
> active directory and specify a home user under profile i will get " the home
> folder could not be created because: the network name cannot be found" I
> know for sure I am getting that error because the user home folder doesn't
> exist yet on the samba machine - is there any way to get the user home
> created automatically once a new user are added to active directory.
> 
> Note: If the new user log in the linux terminal the home user will be
> created automatically because i am using session required
> /lib/security/$ISA/pam_mkhomedir.so skel=/etc/skel umask=0077
> in my pam.d/system_auth. how do i get the same thing working when i create a
> user with active directory.

You might try adding the following to your smb.conf file:

[global]
  obey pam restrictions = yes


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


Re: [Samba] Samba and Medisoft

2006-12-11 Thread Ed Plese
On Mon, Dec 11, 2006 at 10:46:47AM -0600, Scott Swaim wrote:
> I am looking at putting the medisoft application on a samba share.  I was 
> wondering if there is currently anyone using this configuration and if so 
> then what are some of the problems that I might encounter.  The app is 
> currently being hosted on a Winxp pro machine and I need to move it to a 
> server.  Any help would be greatly appreciated.

As long as the application can be run from a UNC path or a mapped network
drive then you shouldn't run into any problems.


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


Re: [Samba] mod_ntlm_winbind on Apache vs. IE6, no POST method

2005-10-05 Thread Ed Plese
On Mon, Oct 03, 2005 at 02:34:22PM -0600, Todd Garrison wrote:
> I have setup mod_ntlm_winbind to provide authentication for an Apache
> 1.3.33 webserver running on Fedora Core 3. The authentication works,
> but I have run into a problem when using Internet Explorer.
> 
> It seems that the problem might be with Internet Explorer itself, but
> here is what I think is happening - the browser will not submit any
> forms with a POST method on a website protected with NTLM Auth.
> 
> Everything seems to work fine when using Firefox/Mozilla, but IE6 has
> a problem. Attached is the text extracted from a packet capture using
> both browsers:

> You can see that IE6 sends content-length: 0 and includes the NTLM
> hash again, whereas Firefox does not.
> 
> Is this a bug in mod_ntlm_winbind, IE6, or just a configuration error?

You never specified if you were using HTTP or HTTPS, but if you're using
doing this over HTTPS you may find this link helpful:

http://telanis.cns.ualberta.ca/index.txt

Apparently there's a bug in IE6 that occurs only with POST requests over
HTTPS when using keep-alive which is required for NTLM authentication.


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


Re: [Samba] Samba HA-Cluster and SAN

2005-09-07 Thread Ed Plese
On Wed, Sep 07, 2005 at 04:36:47PM +0200, Thommen, Christoph FKD wrote:
> I'm trying to set up a high available (HA) cluster with samba and store
> the data on a SAN.
> Are there any known problems that I should no before starting this
> project?
> Have someone of you already realized a project like this? And which
> cluster-software did you use?

The High Availability chapter of the Samba HOWTO is a great place to
start.

http://us1.samba.org/samba/docs/man/Samba3-HOWTO/SambaHA.html

For reasons cited there, your best bet is an active/standby
cluster configuration.  With this setup you'd have two servers
up and running, but only one of them would be serving files with
Samba.  In the event of a problem with the Samba server, the
standby server would take over and begin serving the files.
There are various programs that can be used to help automate the
failover.

It is worthwhile to note that during failover SMB connections
will be lost and will have to be reestablished.  With newer
Windows clients the reconnection will typically occur automatically
though any open files will likely be closed.  The loss of
connections would occur even in an active/active configuration
though only half of the clients (those connected to the failing
server) would be affected.


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


Re: [Samba] Winbindd chokes on W2K users in only one group

2005-08-17 Thread Ed Plese
On Thu, Jun 02, 2005 at 01:04:35PM -0400, neil klopfenstein wrote:
> I've been trying to set up Samba 3.0.14a with Active Directory 
> integration on a network with an ordinary W2k Server PDC. I'm currently 
> having a problem which I'm convinced has nothing to do with my Windows 
> or Samba configuration.
> 
> The problem only occurs when trying to connect to the Samba server from 
> an authenticated domain account which is only a member of the default 
> 'Domain users' group. When this is the case, the 
> 'make_server_info_from_pw' function returns NT_STATUS_NO_SUCH_USER, 
> incorrectly.
> 

I get the same behavior, with users completely unable to connect.  They
are unable to even view the shares on the server.

Another symptom of this behavior is that executing "wbinfo -r "
with a user that is only a member of a single group (the primary group
of the user) results in the error "Could not get groups for user ".
On any user in multiple groups, this command completes successfully,
showing every group the user is a member of, including the user's
primary group.

> If the same user is added to another group, it works fine, though.
> 
> I have experienced this problem in 3.0.13 and 3.0.14a. I didn't try any 
> earlier versions.

I also had this problem with 3.0.14a and upgrading to 3.0.20rc2 showed
the same behavior.  At quick glance, the SAMBA_3_0 SVN code appears to
have the same problem also.

Looking over the code, it appears that the cause of the problem is in
the lookup_usergroups_alt function in winbindd_ads.c.  This function
only gets called when the 'tokenGroups' attribute of the AD user object
does not contain any groups.  According to the comments in this file,
instances where 'tokenGroups' does not contain any groups indicates a
"buggy Win2k server".  The Active Directory domain controllers
are running Windows 2000 SP4 with Active Directory in mixed mode 
and every user object that I checked has an empty 'tokenGroups' attribute.

Instead of getting the user's group membership from the 'tokenGroups'
attribute, lookup_usergroups_alt queries AD for any groups that have
the user listed in their 'member' attribute.  Primary groups memberships
however don't appear to be contained in either the 'member' attribute
of the group or the 'memberOf' attribute of the user (at least in the
case of the Domain Users group).  Instead, the RID of the primary
group (e.g. 513 for Domain Users) is contained in the 'primaryGroupID'
attribute of the user.

In the lookup_usergroups_alt function, for cases where the user is
not a member of any other groups other than the primary group,
the query for any groups with the user as a member returns zero
results.  Instead of returning just the primary group,
lookup_usergroups_alt instead returns no groups.  Correcting the
logic can easily be done by returning the primary group for this case.

Patches for 3.0.14a and SAMBA_3_0 branch included.

Is there something uncommon about the above attributes in AD?  Do these
attributes vary with the different AD versions?


Ed Plese
diff -ur samba-3.0.14a/source/nsswitch/winbindd_ads.c 
samba-3.0.14a-patched/source/nsswitch/winbindd_ads.c
--- samba-3.0.14a/source/nsswitch/winbindd_ads.c2005-04-14 
01:14:21.0 -0500
+++ samba-3.0.14a-patched/source/nsswitch/winbindd_ads.c2005-08-17 
07:46:54.0 -0500
@@ -494,37 +494,37 @@
}

count = ads_count_replies(ads, res);
-   if (count == 0) {
-   DEBUG(5,("lookup_usergroups: No supp groups found\n"));
-   
-   status = ads_ntstatus(rc);
-   goto done;
-   }
-   
+
+   /* always add the primary group to the user_gids list */
(*user_gids) = TALLOC_ZERO_ARRAY(mem_ctx, DOM_SID *, count + 1);
(*user_gids)[0] = primary_group;

*num_groups = 1;
+
+
+   if (count > 0) {

-   for (msg = ads_first_entry(ads, res); msg; msg = ads_next_entry(ads, 
msg)) {
-   DOM_SID group_sid;
+   for (msg = ads_first_entry(ads, res); msg; msg = 
ads_next_entry(ads, msg)) {
+   DOM_SID group_sid;

-   if (!ads_pull_sid(ads, msg, "objectSid", &group_sid)) {
-   DEBUG(1,("No sid for this group ?!?\n"));
-   continue;
-   }
+   if (!ads_pull_sid(ads, msg, "objectSid", &group_sid)) {
+   DEBUG(1,("No sid for this group ?!?\n"));
+   continue;
+   }

-   if (sid_equal(&group_sid, primary_group)) continue;
+   if 

Re: [Samba] retry: VFS databaseFS

2004-12-06 Thread Ed Plese
On Mon, Dec 06, 2004 at 08:53:02PM +, gianni wrote:
> I'm looking for Database FS, a VFS module written by Eric Lorimer.
> Anyone knows where to find it?
> Note that the link on the samba official documentation is no longer valid...

I tried this out a while ago without any success.  The idea is very cool
though.  I forget why I couldn't get it to work.

In any case, I put the version I had downloaded on my site.

http://www.edplese.com/files/musicdb.0.1-2.tar.gz

If you get it to work, please let me know.

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


Re: [Samba] distribute/deploy software to clients

2004-11-11 Thread Ed Plese
On Sun, Nov 07, 2004 at 05:04:29PM +0100, Florian Effenberger wrote:
> Hello,
> 
> I run a Windows domain based on Samba 3 and I am searching for a way to 
> distribute/deploy software to clients.

Sorry for the late response, but to add to the list of responses,
http://www.pcrdist.org/ has always seemed like a neat idea.  It's even
free now.  I haven't taken the time to thoroughly try it out yet though.

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


[Samba] idmap backend with Active Directory LDAP

2004-05-09 Thread Ed Plese
Everything that I have read about 'idmap backend' describes it being used
with a standalone LDAP server.  Is it possible though to configure Samba
to store idmaps directly in an Active Directory LDAP using 'idmap backend'?

This would obviously involve some schema changes to Active Directory, but
other than that I can't think of any technical reasons why this would not
be possible.  I could be wrong is saying this though.

Thanks,
Ed

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