Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Samba] Samba 4 AD share: Access denied

2,114 views
Skip to first unread message

Ryan Ashley

unread,
Jul 24, 2014, 11:50:02 AM7/24/14
to
I have been using Samba4 for ages and love it as a DC and a
print-server. I just setup my first member-server designed solely to
host file shares, and have hit an issue. Group policy is mapping it
correctly for the users in the group, but those users are getting an
access denied message from their Windows 7 Pro 64bit clients when
accessing the share. I have configured ACLs and the box resolves users
and groups. Everything works, except for the shares. Below I attached
all of the information I believe to be useful. Ask if you need more, and
thank you for your help!

smb.conf:
======
[global]
netbios name = FS01
workgroup = TRUEVINE
security = ADS
realm = TRUEVINE.LAN
encrypt passwords = yes

idmap config *:backend = tdb
idmap config *:range = 70001-80000
idmap config SAMDOM:backend = ad
idmap config SAMDOM:schema_mode = rfc2307
idmap config SAMDOM:range = 500-40000

winbind nss info = rfc2307
winbind trusted domains only = no
winbind use default domain = yes
winbind enum users = yes
winbind enum groups = yes

vfs objects = acl_xattr
map acl inherit = yes
store dos attributes = yes
auth methods = winbind

[install$]
path = /home/shared/install
comment = "Software installation files"
read only = no

[staff$]
path = /home/shared/staff
comment = "Staff file share"
read only = no

[fbc$]
path = /home/shared/fbc
comment = "Family Bible College file share"
read only = no



ACL List:
======
root@fs01:~# getfacl /home/shared/staff/
getfacl: Removing leading '/' from absolute path names
# file: home/shared/staff/
# owner: reachfp
# group: administration
# flags: ss-
user::rwx
user:reachfp:rwx
group::rwx
group:administration:rwx
group:domain\040admins:rwx
group:70028:rwx
mask::rwx
other::rwx
default:user::rwx
default:user:reachfp:rwx
default:group::---
default:group:administration:rwx
default:group:domain\040admins:rwx
default:group:70028:rwx
default:mask::rwx
default:other::---

root@fs01:~# getfacl /home/shared/fbc/
getfacl: Removing leading '/' from absolute path names
# file: home/shared/fbc/
# owner: reachfp
# group: fbc
# flags: ss-
user::rwx
user:reachfp:rwx
group::rwx
group:fbc:rwx
group:domain\040admins:rwx
group:70028:rwx
mask::rwx
other::rwx
default:user::rwx
default:user:reachfp:rwx
default:group::---
default:group:fbc:rwx
default:group:domain\040admins:rwx
default:group:70028:rwx
default:mask::rwx
default:other::---



NSSwitch:
======
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd: compat winbind
group: compat winbind
shadow: compat

hosts: files dns
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nis



FS Permissions:
==========
root@fs01:~# l /home/shared
total 40
drwsrwsrwx+ 6 reachfp fbc 4096 Jul 23 11:31 fbc
drwsrws---+ 8 reachfp domain admins 4096 Jul 23 11:14 install
drwx------ 2 root root 16384 Jul 15 10:00 lost+found
drwsrwsrwx+ 13 reachfp administration 4096 Jul 23 11:30 staff



As you can see, I even tried changing the directory permissions to 777
and still no go. The users in the "administration" group are getting the
drive mapped but are being denied access to it. Same for FBC. I have
worked on this for days now and cannot get anywhere. What should I try next?
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba

Dale Schroeder

unread,
Jul 25, 2014, 8:10:02 AM7/25/14
to
Ryan,

Assuming this is a verbatim copy of your config, should not "idmap
config SAMDOM" actually be "idmap config TRUEVINE"?

Dale

Ryan Ashley

unread,
Jul 25, 2014, 11:30:02 AM7/25/14
to
I just realized reply sent this straight to you, Dale. Sorry about that.

I have made the changes but am not sure if it worked yet. I rebooted the
system, which happens to be a Debian Wheezy 64bit system running under
XenServer. Now I am waiting for a complaint. So far none, which is good.
I will respond again if anything fails to work.

Just for kicks, are there any TDB files I should delete now that I
changed this?

Ryan Ashley

unread,
Jul 25, 2014, 10:10:02 PM7/25/14
to
As per suggestion, I deleted the TDB files after a reboot, then brought
up nmbd, smbd, and winbindd. All TDB files were regenerated but the
problem persists. I can resolve AD groups with wbinfo, but share access
appears to only be granted to the owner. I need this fixed ASAP. I am
out of ideas now.


On 7/25/2014 5:00 PM, Dale Schroeder wrote:
> I'll reply to you offline also, as these comments are fairly
> insignificant.
>
> On 07/25/2014 7:51 AM, Ryan Ashley wrote:
>> You are correct. I forgot to change it. Chalk it up to being
>> exhausted when I did this. I will make the change now. Could this
>> cause my issues though?
> In a word, yes. It appears to be essential.
>
> To answer the question in your list email, if you should have any
> further problems, the cache tdb's may have to be regenerated. There
> are probably some SAMDOM entries in the default backend, but this may
> never be an issue since the domain doesn't exist. Beyond that, I
> can't offer any specific advice because I don't have the ability to
> use the ad backend here. We have no Samba DC's nor Windows DC's with
> SFU installed.
>
> Good luck,
> Dale
>
>>
>> On 07/24/2014 03:41 PM, Dale Schroeder wrote:

steve

unread,
Jul 26, 2014, 3:30:02 AM7/26/14
to
On Fri, 2014-07-25 at 22:07 -0400, Ryan Ashley wrote:
> As per suggestion, I deleted the TDB files after a reboot, then brought
> up nmbd, smbd, and winbindd. All TDB files were regenerated but the
> problem persists. I can resolve AD groups with wbinfo, but share access
> appears to only be granted to the owner. I need this fixed ASAP. I am
> out of ideas now.
Hi
What does 70028 map to?
https://lists.samba.org/archive/samba/2014-July/183149.html


<remove>
> >>>> vfs objects = acl_xattr
> >>>> map acl inherit = yes
> >>>> store dos attributes = yes
> >>>> auth methods = winbind
</remove>

net cache flush
remove all the acls on the share folders
reset only the group rw
restart smbd
and try again
HTH
Steve

Rowland Penny

unread,
Jul 26, 2014, 4:20:01 AM7/26/14
to
You seem to have 'flags' set on the directories, as I have never seen
this before I read the manpage and found this means that all files in
the directory will be owned by whoever owns the directory. I do not know
how you set the 'flags' but I suggest you find out how to remove them, I
think that this will cure your problem.

Rowland

steve

unread,
Jul 26, 2014, 5:10:01 AM7/26/14
to
Hi
@Rowland
chmod u-s <folder>
and
chmod g-s <folder>

I think that's OK, but I've suggested removing everything and starting
with only the sticky bit on group:
chmod g+s
in combination with the group rw acl. That is all we are using here for
our group access share. What we are not seeing here are the xacls, but
the OP is doing it on the samba side. The group rw maps fine in windows.
It also looks as though windows has had its say too as there is a
builtin acl set too.
Cheers,
Steve

Rowland Penny

unread,
Jul 26, 2014, 5:40:01 AM7/26/14
to
Hi, I actually knew that ;-) I was trying to get the OP to read up on
getfacl a bit more.
>
> I think that's OK, but I've suggested removing everything and starting
> with only the sticky bit on group:
> chmod g+s
> in combination with the group rw acl. That is all we are using here for
> our group access share. What we are not seeing here are the xacls, but
> the OP is doing it on the samba side. The group rw maps fine in windows.
> It also looks as though windows has had its say too as there is a
> builtin acl set too.
> Cheers,
> Steve
>
>
>
I would also suggest that the OP has a read here:

https://wiki.samba.org/index.php/Setup_and_configure_file_shares_with_Windows_ACLs

Rowland

Ryan Ashley

unread,
Jul 26, 2014, 5:30:01 PM7/26/14
to
Alright, I just read the responses. I have two pickup trucks and one is
older and acting up, so I have been working on it. On to the responses!
Also, I sent this once by accident to Rowland. Still not used to having
to change the reply field to the list. My apologies.

Yes I set g+s and u+s via chmod. This was great in Samba 3, but I can
undo it if needed. I believe 700028 is "SYSTEM". The directories and
files are owned by "administration", "domain admins", and "SYSTEM". Same
for the other share, except "fbc" instead of "administration". And I
used the linked article as a guide for setting up these shares, so it
has been used up. I only set the sticky bits after it wasn't working. I
was trying to get it working and wanted a standard user and group.
Either way, that was the guide I used before posting to this list.

steve

unread,
Jul 26, 2014, 6:50:01 PM7/26/14
to
On Sat, 2014-07-26 at 17:20 -0400, Ryan Ashley wrote:
> Alright, I just read the responses. I have two pickup trucks and one is
> older and acting up, so I have been working on it. On to the responses!
> Also, I sent this once by accident to Rowland. Still not used to having
> to change the reply field to the list. My apologies.
>
> Yes I set g+s and u+s via chmod. This was great in Samba 3, but I can
> undo it if needed. I believe 700028 is "SYSTEM".

Hi
But we're not interested in 700028. In any case, whatever the mapping of
the builtin group is under winbind on the file server will not be the
same as on the DC. The mapping of the builtin groups on the DC begin at
3000000 and are stored in a db called idmap. You need to know the sid to
which 70028 corresponds. wbinfo will get you there.

I've no idea why recent versions add the builtin acl but it appeared
some time after 4.1.6.

HTH
Steve

Rowland Penny

unread,
Jul 27, 2014, 5:00:01 AM7/27/14
to
OK, after a bit more thought, I decided that as everything seems to be
correct it is probably a windows problem. A quick internet search turned
this up:

http://www.eightforums.com/network-sharing/18056-w2k3-server-can-access-windows-8-windows-8-computer-cant-see-w2k-server.html#post177162

Have a look, I think that it may fix your problems.

Ryan Ashley

unread,
Jul 27, 2014, 10:20:02 AM7/27/14
to
That solution is for Windows 8. That also is not our issue. The
WIndows 7 Pro 64bit workstations see the server and shares, and they map
the shares according to group policy, but then everybody gets access
denied, despite being in the domain groups for which the shares were
created. Funny thing is that if I logon as domain admin, I get to access
the shares. Due to this, I fully believe the S4 server is ignoring or
not accounting for group membership. The "reachfp" account is the domain
admin. This is also the default owner of files on the shares. The group
"administration" contains many members and does not grant access,
despite the group being granted full control. This lead e into believing
I am still dealing with a permissions issue and not another issue. If it
was the other issue, I would assume domain admin could not see the share
or access it. Is that about right?

Rowland Penny

unread,
Jul 27, 2014, 11:00:01 AM7/27/14
to
You are missing the point, I probably could have chosen a better target
but I only spent about 30secs on the search:

windows 7 64 bit access denied samba

This returns About 116,000 results, here's another one:

http://www.sevenforums.com/network-sharing/242602-can-t-connect-samba-share-win-7-ultimate-64-bit.html

Try looking into this before dismissing it out of hand and insisting
that samba is the problem.

Ryan Ashley

unread,
Jul 27, 2014, 11:30:01 AM7/27/14
to
I understand and I should have stated more clearly that I have been
going through those results for over a week now. Nothing seems to help.
Funny thing is that creating a second virtual file-server and using
share authentication works fine. Yet another reason I am leaning towards
group issues. If the file-server is share-level the Windows 7 boxes are
happy. As soon as it goes AD and uses AD groups, they stop working. I
have not tried user-level security yet. Then again I may have user-level
and share-level confused. It has been a long week. I will keep searching
but so far nothing I have found and tried works.

Is there a way to get an actual reason for the denial? If it flat-out
told me a reason I could troubleshoot. Right now I am just shooting in
random directions hoping to hit something since all I get is "Access
Denied". Is it possible to see is S4 is denying the connection via a log
or something, or if Windows 7 is being stupid... again?

Davor Vusir

unread,
Jul 27, 2014, 3:00:02 PM7/27/14
to
-- Skickat från mobilusken! --

Den 27 jul 2014 17:28 skrev "Ryan Ashley" <ry...@reachtechfp.com>:
>
> I understand and I should have stated more clearly that I have been going
through those results for over a week now. Nothing seems to help. Funny
thing is that creating a second virtual file-server and using share
authentication works fine. Yet another reason I am leaning towards group
issues. If the file-server is share-level the Windows 7 boxes are happy. As
soon as it goes AD and uses AD groups, they stop working. I have not tried
user-level security yet. Then again I may have user-level and share-level
confused. It has been a long week. I will keep searching but so far nothing
I have found and tried works.
>
> Is there a way to get an actual reason for the denial? If it flat-out
told me a reason I could troubleshoot. Right now I am just shooting in
random directions hoping to hit something since all I get is "Access
Denied". Is it possible to see is S4 is denying the connection via a log or
something, or if Windows 7 is being stupid... again?
>

I have hade a similar problem on a combined AD DC and file server. Are the
groups in question of scope 'Domain Local'? If so, convert them to Global.
https://lists.samba.org/archive/samba/2014-March/180173.html

Regards
Davor

Ryan Ashley

unread,
Jul 27, 2014, 11:50:02 PM7/27/14
to
They were created a global security groups. I just remoted in and
checked and they are still global security groups. Any other ideas? I
have tried about everything I can think of and can find online at this
point.

Rowland Penny

unread,
Jul 28, 2014, 5:10:02 AM7/28/14
to
OK, after more thought and re-reading your posts, a thought has popped
into my head, apparmor, do you have this running on the server ?
I have been caught out by this a few times, not being allowed to do
things that I thought I should be able to do, or packages not running
correctly because they were not allowed access, in every case it was
apparmor. As I could never get apparmor to play ball with me (I thought
that I had found all rights that needed modding and then another one
would pop its head up and what is in the logs bares no resemblance to
what you need to put in the conf file), I now disable apparmor straight
after installing a new system.

Ryan Ashley

unread,
Jul 28, 2014, 8:30:03 AM7/28/14
to
Alright, even with that change they cannot access the share. I do not have SELinux on this system to my knowledge. The only change since my initial post was changing SAMDOM in my config to TRUEVINE as was pointed out. I then rebooted the server for good measure. People in the AD group FBC are still debied access to the FBC share and people in the AD administration group are still denied access to the staff share.


Sent from my Verizon Wireless 4G LTE smartphone

<div>-------- Original message --------</div><div>From: Ryan Ashley <ry...@reachtechfp.com> </div><div>Date:2014/07/25 11:21 (GMT-05:00) </div><div>To: sa...@lists.samba.org </div><div>Subject: Re: [Samba] Samba 4 AD share: Access denied </div><div>
</div>I just realized reply sent this straight to you, Dale. Sorry about that.

I have made the changes but am not sure if it worked yet. I rebooted the
system, which happens to be a Debian Wheezy 64bit system running under
XenServer. Now I am waiting for a complaint. So far none, which is good.
I will respond again if anything fails to work.

Just for kicks, are there any TDB files I should delete now that I
changed this?

Ryan Ashley

unread,
Jul 28, 2014, 9:20:05 AM7/28/14
to
I have never even played with apparmor. I do my Debian installs using a
net CD and doing the expert 64bit install. I disable recommended and
suggested packages and install only exactly what I need, so I do not
have apparmor or selinux. Good thought though. I also tried disabling
the firewall on a test PC and still no go. This has NEVER happened
before so I am lost.

So where else should I look? The system in question is a domain member
server, can resolve users and groups, and can set ACLs with user and
groups from AD. It is simply denying access to group members of said shares.

Rowland Penny

unread,
Jul 28, 2014, 9:50:03 AM7/28/14
to
OK, getting a bit lost here now, have you tried raising the log level in
smb.conf and seeing if anything appears in the logs ?

Ryan Ashley

unread,
Jul 28, 2014, 9:50:04 AM7/28/14
to
Alright, I was poking around this morning trying to make this work, and
noticed something odd. Loads of zombie nmbd processes. Check out the
dump below and tell me, what is going on here? Is this my problem?

root@fs01:~# ps x
PID TTY STAT TIME COMMAND
1 ? Ss 0:02 init [2]
2 ? S 0:00 [kthreadd]
3 ? S 0:00 [ksoftirqd/0]
5 ? S 0:00 [kworker/u:0]
6 ? S 0:00 [migration/0]
7 ? S 0:01 [watchdog/0]
8 ? S< 0:00 [cpuset]
9 ? S< 0:00 [khelper]
10 ? S 0:00 [kdevtmpfs]
11 ? S< 0:00 [netns]
12 ? S 0:00 [xenwatch]
13 ? S 0:00 [xenbus]
14 ? S 0:01 [sync_supers]
15 ? S 0:00 [bdi-default]
16 ? S< 0:00 [kintegrityd]
17 ? S< 0:00 [kblockd]
19 ? S 0:00 [khungtaskd]
20 ? S 0:00 [kswapd0]
21 ? SN 0:00 [ksmd]
22 ? SN 0:00 [khugepaged]
23 ? S 0:00 [fsnotify_mark]
24 ? S< 0:00 [crypto]
173 ? S 0:00 [jbd2/xvda1-8]
174 ? S< 0:00 [ext4-dio-unwrit]
183 ? S 0:00 [kworker/u:1]
313 ? Ss 0:00 udevd --daemon
420 ? S 0:00 udevd --daemon
425 ? S 0:00 udevd --daemon
433 ? S 0:00 [khubd]
438 ? S< 0:00 [kpsmoused]
445 ? S< 0:00 [ata_sff]
471 ? S 0:00 [scsi_eh_0]
472 ? S 0:00 [scsi_eh_1]
1295 ? S 0:00 [jbd2/xvda2-8]
1296 ? S< 0:00 [ext4-dio-unwrit]
1297 ? S 0:01 [flush-202:0]
1298 ? S 0:00 [jbd2/xvda9-8]
1299 ? S< 0:00 [ext4-dio-unwrit]
1300 ? S 0:00 [jbd2/xvda10-8]
1301 ? S< 0:00 [ext4-dio-unwrit]
1302 ? S 0:00 [jbd2/xvda8-8]
1303 ? S< 0:00 [ext4-dio-unwrit]
1307 ? S 0:00 [jbd2/xvda11-8]
1308 ? S< 0:00 [ext4-dio-unwrit]
1309 ? S 0:00 [jbd2/xvda3-8]
1310 ? S< 0:00 [ext4-dio-unwrit]
1311 ? S 0:00 [jbd2/xvda4-8]
1312 ? S< 0:00 [ext4-dio-unwrit]
1313 ? S 0:00 [jbd2/xvda5-8]
1314 ? S< 0:00 [ext4-dio-unwrit]
1315 ? S 0:00 [jbd2/xvda6-8]
1316 ? S< 0:00 [ext4-dio-unwrit]
1317 ? S 0:00 [jbd2/xvda7-8]
1318 ? S< 0:00 [ext4-dio-unwrit]
1319 ? S 0:00 [jbd2/xvdb1-8]
1320 ? S< 0:00 [ext4-dio-unwrit]
1780 ? Sl 0:00 /usr/sbin/rsyslogd -c5
1811 ? Ss 0:00 /usr/sbin/acpid
1903 ? Ss 0:00 /usr/sbin/cron
1998 ? Ss 0:00 /usr/sbin/sshd
2022 tty1 Ss+ 0:00 /sbin/getty 38400 tty1
2023 tty2 Ss+ 0:00 /sbin/getty 38400 tty2
2024 tty3 Ss+ 0:00 /sbin/getty 38400 tty3
2025 tty4 Ss+ 0:00 /sbin/getty 38400 tty4
2026 tty5 Ss+ 0:00 /sbin/getty 38400 tty5
2027 tty6 Ss+ 0:00 /sbin/getty 38400 tty6
2041 ? Ss 0:03 nmbd
2043 ? Ss 0:03 smbd
2045 ? Ss 0:00 winbindd
2046 ? S 0:02 winbindd
2047 ? S 0:00 winbindd
2048 ? S 0:00 winbindd
2049 ? S 0:00 smbd
2067 ? Z 0:00 [nmbd] <defunct>
2085 ? Z 0:00 [nmbd] <defunct>
2109 ? Z 0:00 [nmbd] <defunct>
2127 ? Z 0:00 [nmbd] <defunct>
2145 ? Z 0:00 [nmbd] <defunct>
2163 ? Z 0:00 [nmbd] <defunct>
2185 ? Z 0:00 [nmbd] <defunct>
2203 ? Z 0:00 [nmbd] <defunct>
2223 ? Z 0:00 [nmbd] <defunct>
2241 ? Z 0:00 [nmbd] <defunct>
2263 ? Z 0:00 [nmbd] <defunct>
2281 ? Z 0:00 [nmbd] <defunct>
2299 ? Z 0:00 [nmbd] <defunct>
2317 ? Z 0:00 [nmbd] <defunct>
2339 ? Z 0:00 [nmbd] <defunct>
2357 ? Z 0:00 [nmbd] <defunct>
2375 ? Z 0:00 [nmbd] <defunct>
2393 ? Z 0:00 [nmbd] <defunct>
2415 ? Z 0:00 [nmbd] <defunct>
2433 ? Z 0:00 [nmbd] <defunct>
2451 ? Z 0:00 [nmbd] <defunct>
2469 ? Z 0:00 [nmbd] <defunct>
2491 ? Z 0:00 [nmbd] <defunct>
2509 ? Z 0:00 [nmbd] <defunct>
2527 ? Z 0:00 [nmbd] <defunct>
2545 ? Z 0:00 [nmbd] <defunct>
2567 ? Z 0:00 [nmbd] <defunct>
2585 ? Z 0:00 [nmbd] <defunct>
2603 ? Z 0:00 [nmbd] <defunct>
2621 ? Z 0:00 [nmbd] <defunct>
2643 ? Z 0:00 [nmbd] <defunct>
2661 ? Z 0:00 [nmbd] <defunct>
2679 ? Z 0:00 [nmbd] <defunct>
2697 ? Z 0:00 [nmbd] <defunct>
2719 ? Z 0:00 [nmbd] <defunct>
2737 ? Z 0:00 [nmbd] <defunct>
2755 ? Z 0:00 [nmbd] <defunct>
2773 ? Z 0:00 [nmbd] <defunct>
2795 ? Z 0:00 [nmbd] <defunct>
2813 ? Z 0:00 [nmbd] <defunct>
2831 ? Z 0:00 [nmbd] <defunct>
2849 ? Z 0:00 [nmbd] <defunct>
2871 ? Z 0:00 [nmbd] <defunct>
2889 ? Z 0:00 [nmbd] <defunct>
2907 ? Z 0:00 [nmbd] <defunct>
2925 ? Z 0:00 [nmbd] <defunct>
2946 ? Z 0:00 [nmbd] <defunct>
2964 ? Z 0:00 [nmbd] <defunct>
2982 ? Z 0:00 [nmbd] <defunct>
3000 ? Z 0:00 [nmbd] <defunct>
3022 ? Z 0:00 [nmbd] <defunct>
3040 ? Z 0:00 [nmbd] <defunct>
3058 ? Z 0:00 [nmbd] <defunct>
3076 ? Z 0:00 [nmbd] <defunct>
3098 ? Z 0:00 [nmbd] <defunct>
3116 ? Z 0:00 [nmbd] <defunct>
3134 ? Z 0:00 [nmbd] <defunct>
3152 ? Z 0:00 [nmbd] <defunct>
3174 ? Z 0:00 [nmbd] <defunct>
3192 ? Z 0:00 [nmbd] <defunct>
3210 ? Z 0:00 [nmbd] <defunct>
3228 ? Z 0:00 [nmbd] <defunct>
3250 ? Z 0:00 [nmbd] <defunct>
3268 ? Z 0:00 [nmbd] <defunct>
3285 ? Z 0:00 [nmbd] <defunct>
3303 ? Z 0:00 [nmbd] <defunct>
3325 ? Z 0:00 [nmbd] <defunct>
3343 ? Z 0:00 [nmbd] <defunct>
3361 ? Z 0:00 [nmbd] <defunct>
3380 ? Z 0:00 [nmbd] <defunct>
3402 ? Z 0:00 [nmbd] <defunct>
3420 ? Z 0:00 [nmbd] <defunct>
3438 ? Z 0:00 [nmbd] <defunct>
3456 ? Z 0:00 [nmbd] <defunct>
3574 ? Z 0:00 [nmbd] <defunct>
3592 ? Z 0:00 [nmbd] <defunct>
3610 ? Z 0:00 [nmbd] <defunct>
3628 ? Z 0:00 [nmbd] <defunct>
3650 ? Z 0:00 [nmbd] <defunct>
3668 ? Z 0:00 [nmbd] <defunct>
3686 ? Z 0:00 [nmbd] <defunct>
3704 ? Z 0:00 [nmbd] <defunct>
3726 ? Z 0:00 [nmbd] <defunct>
3744 ? Z 0:00 [nmbd] <defunct>
3762 ? Z 0:00 [nmbd] <defunct>
3780 ? Z 0:00 [nmbd] <defunct>
3802 ? Z 0:00 [nmbd] <defunct>
3820 ? Z 0:00 [nmbd] <defunct>
3838 ? Z 0:00 [nmbd] <defunct>
3856 ? Z 0:00 [nmbd] <defunct>
3878 ? Z 0:00 [nmbd] <defunct>
3896 ? Z 0:00 [nmbd] <defunct>
3914 ? Z 0:00 [nmbd] <defunct>
3932 ? Z 0:00 [nmbd] <defunct>
3954 ? Z 0:00 [nmbd] <defunct>
3972 ? Z 0:00 [nmbd] <defunct>
3990 ? Z 0:00 [nmbd] <defunct>
4008 ? Z 0:00 [nmbd] <defunct>
4030 ? Z 0:00 [nmbd] <defunct>
4048 ? Z 0:00 [nmbd] <defunct>
4066 ? Z 0:00 [nmbd] <defunct>
4084 ? Z 0:00 [nmbd] <defunct>
4106 ? Z 0:00 [nmbd] <defunct>
4124 ? Z 0:00 [nmbd] <defunct>
4142 ? Z 0:00 [nmbd] <defunct>
4160 ? Z 0:00 [nmbd] <defunct>
4182 ? Z 0:00 [nmbd] <defunct>
4200 ? Z 0:00 [nmbd] <defunct>
4220 ? Z 0:00 [nmbd] <defunct>
4238 ? Z 0:00 [nmbd] <defunct>
4261 ? Z 0:00 [nmbd] <defunct>
4279 ? Z 0:00 [nmbd] <defunct>
4297 ? Z 0:00 [nmbd] <defunct>
4315 ? Z 0:00 [nmbd] <defunct>
4337 ? Z 0:00 [nmbd] <defunct>
4355 ? Z 0:00 [nmbd] <defunct>
4373 ? Z 0:00 [nmbd] <defunct>
4391 ? Z 0:00 [nmbd] <defunct>
4413 ? Z 0:00 [nmbd] <defunct>
4431 ? Z 0:00 [nmbd] <defunct>
4449 ? Z 0:00 [nmbd] <defunct>
4467 ? Z 0:00 [nmbd] <defunct>
4489 ? Z 0:00 [nmbd] <defunct>
4507 ? Z 0:00 [nmbd] <defunct>
4525 ? Z 0:00 [nmbd] <defunct>
4543 ? Z 0:00 [nmbd] <defunct>
4565 ? Z 0:00 [nmbd] <defunct>
4583 ? Z 0:00 [nmbd] <defunct>
4601 ? Z 0:00 [nmbd] <defunct>
4619 ? Z 0:00 [nmbd] <defunct>
4641 ? Z 0:00 [nmbd] <defunct>
4659 ? Z 0:00 [nmbd] <defunct>
4677 ? Z 0:00 [nmbd] <defunct>
4694 ? Z 0:00 [nmbd] <defunct>
4716 ? Z 0:00 [nmbd] <defunct>
4734 ? Z 0:00 [nmbd] <defunct>
4752 ? Z 0:00 [nmbd] <defunct>
4770 ? Z 0:00 [nmbd] <defunct>
4792 ? Z 0:00 [nmbd] <defunct>
4811 ? Z 0:00 [nmbd] <defunct>
4829 ? Z 0:00 [nmbd] <defunct>
4847 ? Z 0:00 [nmbd] <defunct>
4869 ? Z 0:00 [nmbd] <defunct>
4887 ? Z 0:00 [nmbd] <defunct>
4905 ? Z 0:00 [nmbd] <defunct>
4923 ? Z 0:00 [nmbd] <defunct>
4945 ? Z 0:00 [nmbd] <defunct>
4963 ? Z 0:00 [nmbd] <defunct>
4981 ? Z 0:00 [nmbd] <defunct>
4999 ? Z 0:00 [nmbd] <defunct>
5021 ? Z 0:00 [nmbd] <defunct>
5039 ? Z 0:00 [nmbd] <defunct>
5057 ? Z 0:00 [nmbd] <defunct>
5075 ? Z 0:00 [nmbd] <defunct>
5097 ? Z 0:00 [nmbd] <defunct>
5115 ? Z 0:00 [nmbd] <defunct>
5133 ? Z 0:00 [nmbd] <defunct>
5151 ? Z 0:00 [nmbd] <defunct>
5173 ? Z 0:00 [nmbd] <defunct>
5191 ? Z 0:00 [nmbd] <defunct>
5209 ? Z 0:00 [nmbd] <defunct>
5227 ? Z 0:00 [nmbd] <defunct>
5249 ? Z 0:00 [nmbd] <defunct>
5267 ? Z 0:00 [nmbd] <defunct>
5285 ? Z 0:00 [nmbd] <defunct>
5303 ? Z 0:00 [nmbd] <defunct>
5325 ? Z 0:00 [nmbd] <defunct>
5343 ? Z 0:00 [nmbd] <defunct>
5361 ? Z 0:00 [nmbd] <defunct>
5379 ? Z 0:00 [nmbd] <defunct>
5525 ? Z 0:00 [nmbd] <defunct>
5543 ? Z 0:00 [nmbd] <defunct>
5571 ? Z 0:00 [nmbd] <defunct>
5589 ? Z 0:00 [nmbd] <defunct>
5611 ? Z 0:00 [nmbd] <defunct>
5630 ? Z 0:00 [nmbd] <defunct>
5648 ? Z 0:00 [nmbd] <defunct>
5666 ? Z 0:00 [nmbd] <defunct>
5688 ? Z 0:00 [nmbd] <defunct>
5706 ? Z 0:00 [nmbd] <defunct>
5724 ? Z 0:00 [nmbd] <defunct>
5742 ? Z 0:00 [nmbd] <defunct>
5764 ? Z 0:00 [nmbd] <defunct>
5782 ? Z 0:00 [nmbd] <defunct>
5800 ? Z 0:00 [nmbd] <defunct>
5818 ? Z 0:00 [nmbd] <defunct>
5840 ? Z 0:00 [nmbd] <defunct>
5858 ? Z 0:00 [nmbd] <defunct>
5876 ? Z 0:00 [nmbd] <defunct>
5894 ? Z 0:00 [nmbd] <defunct>
5916 ? Z 0:00 [nmbd] <defunct>
5934 ? Z 0:00 [nmbd] <defunct>
5952 ? Z 0:00 [nmbd] <defunct>
5970 ? Z 0:00 [nmbd] <defunct>
5992 ? Z 0:00 [nmbd] <defunct>
6010 ? Z 0:00 [nmbd] <defunct>
6028 ? Z 0:00 [nmbd] <defunct>
6046 ? Z 0:00 [nmbd] <defunct>
6068 ? Z 0:00 [nmbd] <defunct>
6086 ? Z 0:00 [nmbd] <defunct>
6104 ? Z 0:00 [nmbd] <defunct>
6122 ? Z 0:00 [nmbd] <defunct>
6144 ? Z 0:00 [nmbd] <defunct>
6161 ? Z 0:00 [nmbd] <defunct>
6179 ? Z 0:00 [nmbd] <defunct>
6197 ? Z 0:00 [nmbd] <defunct>
6219 ? Z 0:00 [nmbd] <defunct>
6238 ? Z 0:00 [nmbd] <defunct>
6256 ? Z 0:00 [nmbd] <defunct>
6274 ? Z 0:00 [nmbd] <defunct>
6296 ? Z 0:00 [nmbd] <defunct>
6314 ? Z 0:00 [nmbd] <defunct>
6332 ? Z 0:00 [nmbd] <defunct>
6350 ? Z 0:00 [nmbd] <defunct>
6372 ? Z 0:00 [nmbd] <defunct>
6390 ? Z 0:00 [nmbd] <defunct>
6408 ? Z 0:00 [nmbd] <defunct>
6426 ? Z 0:00 [nmbd] <defunct>
6448 ? Z 0:00 [nmbd] <defunct>
6466 ? Z 0:00 [nmbd] <defunct>
6484 ? Z 0:00 [nmbd] <defunct>
6502 ? Z 0:00 [nmbd] <defunct>
6524 ? Z 0:00 [nmbd] <defunct>
6542 ? Z 0:00 [nmbd] <defunct>
6560 ? Z 0:00 [nmbd] <defunct>
6578 ? Z 0:00 [nmbd] <defunct>
6600 ? Z 0:00 [nmbd] <defunct>
6618 ? Z 0:00 [nmbd] <defunct>
6636 ? Z 0:00 [nmbd] <defunct>
6654 ? Z 0:00 [nmbd] <defunct>
6676 ? Z 0:00 [nmbd] <defunct>
6694 ? Z 0:00 [nmbd] <defunct>
6712 ? Z 0:00 [nmbd] <defunct>
6730 ? Z 0:00 [nmbd] <defunct>
6752 ? Z 0:00 [nmbd] <defunct>
6770 ? Z 0:00 [nmbd] <defunct>
6789 ? Z 0:00 [nmbd] <defunct>
6807 ? Z 0:00 [nmbd] <defunct>
6829 ? Z 0:00 [nmbd] <defunct>
6847 ? Z 0:00 [nmbd] <defunct>
6852 ? S 0:01 [kworker/0:0]
6867 ? Z 0:00 [nmbd] <defunct>
6885 ? Z 0:00 [nmbd] <defunct>
6906 ? Z 0:00 [nmbd] <defunct>
6924 ? Z 0:00 [nmbd] <defunct>
6942 ? Z 0:00 [nmbd] <defunct>
6960 ? Z 0:00 [nmbd] <defunct>
6982 ? Z 0:00 [nmbd] <defunct>
7000 ? Z 0:00 [nmbd] <defunct>
7018 ? Z 0:00 [nmbd] <defunct>
7036 ? Z 0:00 [nmbd] <defunct>
7058 ? Z 0:00 [nmbd] <defunct>
7076 ? Z 0:00 [nmbd] <defunct>
7094 ? Z 0:00 [nmbd] <defunct>
7112 ? Z 0:00 [nmbd] <defunct>
7134 ? Z 0:00 [nmbd] <defunct>
7152 ? Z 0:00 [nmbd] <defunct>
7170 ? Z 0:00 [nmbd] <defunct>
7188 ? Z 0:00 [nmbd] <defunct>
7210 ? Z 0:00 [nmbd] <defunct>
7228 ? Z 0:00 [nmbd] <defunct>
7246 ? Z 0:00 [nmbd] <defunct>
7264 ? Z 0:00 [nmbd] <defunct>
7286 ? Z 0:00 [nmbd] <defunct>
7304 ? Z 0:00 [nmbd] <defunct>
7322 ? Z 0:00 [nmbd] <defunct>
7340 ? Z 0:00 [nmbd] <defunct>
7458 ? Z 0:00 [nmbd] <defunct>
7476 ? Z 0:00 [nmbd] <defunct>
7494 ? Z 0:00 [nmbd] <defunct>
7512 ? Z 0:00 [nmbd] <defunct>
7534 ? Z 0:00 [nmbd] <defunct>
7552 ? Z 0:00 [nmbd] <defunct>
7569 ? Z 0:00 [nmbd] <defunct>
7587 ? Z 0:00 [nmbd] <defunct>
7609 ? Z 0:00 [nmbd] <defunct>
7627 ? Z 0:00 [nmbd] <defunct>
7645 ? Z 0:00 [nmbd] <defunct>
7665 ? Z 0:00 [nmbd] <defunct>
7676 ? S 0:00 [kworker/0:2]
7687 ? Z 0:00 [nmbd] <defunct>
7697 ? Ss 0:00 sshd: root@pts/0
7699 pts/0 Ss 0:00 -bash
7711 ? S 0:00 [kworker/0:1]
7718 ? S 0:00 [flush-202:16]
7721 pts/0 R+ 0:00 ps x

Rowland Penny

unread,
Jul 28, 2014, 10:00:11 AM7/28/14
to
Somebody else reported this problem, he went to 4.1.8 and the zombie
nmbd problem went away, if you upgrade to the latest samba4 you may hit
two birds with one stone, the nmbd problem and your group problem ;-)

Ryan Ashley

unread,
Jul 28, 2014, 10:10:03 AM7/28/14
to
Odd, but it says I am using 4.2.0, which is higher than 4.1.8.

root@fs01:/usr/src/samba-master# samba-tool -V
4.2.0pre1-GIT-d097898
root@fs01:/usr/src/samba-master# winbindd -V
Version 4.2.0pre1-GIT-d097898
root@fs01:/usr/src/samba-master# nmbd -V
Version 4.2.0pre1-GIT-d097898
root@fs01:/usr/src/samba-master#

I normally clone, configure, and build. Is the stable branch not
default? Am I building a testing branch? Should I checkout on the stable
branch?

Rowland Penny

unread,
Jul 28, 2014, 10:20:02 AM7/28/14
to
Hi, what you are using is not the stable branch, it is the branch that
will become the next release i.e. 4.2. This does not mean that you
shouldn't use it, it just means that it could be upgraded at any time
until it is 'frozen' just before release. These upgrades 'could' break
something, not saying they will, just that they could, for production
use I would use the latest version from here:

https://ftp.samba.org/pub/samba/stable/

Ryan Ashley

unread,
Jul 28, 2014, 10:30:03 AM7/28/14
to
Great, so by doing "git clone git://git.samba.org/samba.git
samba-master" I am by default cloning the testing branch. I am going to
do a checkout on stable and try again.

Ryan Ashley

unread,
Jul 28, 2014, 11:20:03 AM7/28/14
to
Found the problem, I believe

[2014/07/28 10:14:44.828015, 3]
../lib/krb5_wrap/krb5_samba.c:266(ads_cleanup_expired_creds)
ads_cleanup_expired_creds: Ticket in ccache[MEMORY:cliconnect]
expiration Mon, 28 Jul 2014 20:14:44 EDT
[2014/07/28 10:31:37.274435, 0]
../source3/winbindd/winbindd.c:266(winbindd_sig_term_handler)
Got sig[15] terminate (is_parent=0)
[2014/07/28 11:02:32.032341, 3]
../source3/winbindd/idmap.c:230(idmap_init_domain)
idmap backend ad not found
[2014/07/28 11:02:32.051673, 3]
../source3/winbindd/idmap.c:235(idmap_init_domain)
Could not probe idmap module ad

As you can see, winbind is having issues with AD. What could cause this?
Currently I have set share permissions in Linux to 777 and am running S4
4.1.10 from the v4-1-stable branch. Is this something I can fix?

Ryan Ashley

unread,
Jul 28, 2014, 6:40:01 PM7/28/14
to
More information in another winbind log. I attempted to login to a
remote Windows 7 box with a normal user account which is in both groups
and should get both drives. Windows logs access denied and does not map
the drives, and I get this in the logs. At this point I am fairly sure
winbind is having issues speaking to the DC due to a missing module
which I can find nothing about online. I did use Google for a while
today and cannot find a match for the phrases below, so I am stuck.

log.wb-TRUEVINE:
[2014/07/28 18:24:52.880743, 3]
../source3/winbindd/winbindd_ads.c:597(query_user)
ads: query_user
[2014/07/28 18:24:52.883979, 1]
../source3/winbindd/winbindd_ads.c:710(query_user)
nss_get_info_cached failed: NT_STATUS_NOT_FOUND

log.winbind-idmap:
[2014/07/28 18:24:52.883979, 3]
../lib/krb5_wrap/krb5_samba.c:266(ads_cleanup_expired_creds)
ads_cleanup_expired_creds: Ticket in ccache[MEMORY:cliconnect]
expiration Mon, 28 Jul 2014 20:14:44 EDT
[2014/07/28 18:24:52.883991, 0]
../source3/winbindd/winbindd.c:266(winbindd_sig_term_handler)
Got sig[15] terminate (is_parent=0)
[2014/07/28 18:24:52.884011, 3]
../source3/winbindd/idmap.c:230(idmap_init_domain)
idmap backend ad not found
[2014/07/28 18:24:52.884072, 3]
../source3/winbindd/idmap.c:235(idmap_init_domain)
Could not probe idmap module ad

Rowland Penny

unread,
Jul 29, 2014, 4:00:01 AM7/29/14
to
Do you have all of these packages installed:

samba libnss-winbind winbind libpam-winbind krb5-config libpam-krb5
krb5-user

If not, install what is missing and add these lines to smb.conf:

dedicated keytab file = /etc/krb5.keytab
kerberos method = secrets and keytab

Restart samba and try again, you may have to join the machine to the
domain again.

Ryan Ashley

unread,
Jul 29, 2014, 9:10:02 AM7/29/14
to
I do not have libpam-krb5 installed, nor have I ever had it installed
anywhere, on any system. I also do not modify pam settings because I do
not want users being able to log into the servers if one decided to be
malicious. Currently each server only has the root account on it and
this was fine in S3.

Before I change anything, I would like to know what that keytab file
does. Just playing it safe. If I do not understand it I will not be able
to support it. Thanks for your time and effort, I do appreciate it.

Rowland Penny

unread,
Jul 29, 2014, 9:30:01 AM7/29/14
to
On 29/07/14 14:01, Ryan Ashley wrote:
> I do not have libpam-krb5 installed, nor have I ever had it installed
> anywhere, on any system. I also do not modify pam settings because I
> do not want users being able to log into the servers if one decided to
> be malicious. Currently each server only has the root account on it
> and this was fine in S3.

OK, you do not need any other users on the server and as long as there
is nowhere for the users to call home, they will not be able to login.
Having said that, the computer needs to authenticate users & groups from
AD, this is where PAM comes in and you need PAM and kerberos to connect
to an AD DC.

>
> Before I change anything, I would like to know what that keytab file
> does. Just playing it safe. If I do not understand it I will not be
> able to support it. Thanks for your time and effort, I do appreciate it.

If you are going to get involved with AD, you need to get involved with
kerberos and keytabs, this subject is a bit involved to go into here,
but you could start here:

https://itservices.stanford.edu/service/kerberos/keytabs

After that, perhaps the samba wiki and there is always the internet ;-)

Rowland

Ryan Ashley

unread,
Jul 29, 2014, 10:10:03 AM7/29/14
to
I understand the basics of Kerberos, but the reason that I am asking is
because I have dozens of S4 servers in production environments and have
never had to create the keytab you mentioned. They all just worked.

Now, I do not mind modifying my pam settings as I have done on loads of
Linux workstations which are joined to an AD domain, but how would I
prevent the login of users? I have a home directory and cannot remove
it, so there is technically a place for their home directories. In
Windows I would simply modify group policy to deny logon, but we both
know Linux knows nothing of a GPO. So without removing "/home", how
would I prevent login?

My plan now is to modify pam first, then if needed, do the keytab.

Rowland Penny

unread,
Jul 29, 2014, 10:30:02 AM7/29/14
to
On 29/07/14 15:00, Ryan Ashley wrote:
> I understand the basics of Kerberos, but the reason that I am asking
> is because I have dozens of S4 servers in production environments and
> have never had to create the keytab you mentioned. They all just worked.

If, when you talk about S4 servers, you mean as an AD DC, then yes you
do not require the keytab, but on a member server (or client) when you
you join the domain with the net command, the keytab is created.
>
> Now, I do not mind modifying my pam settings as I have done on loads
> of Linux workstations which are joined to an AD domain, but how would
> I prevent the login of users? I have a home directory and cannot
> remove it, so there is technically a place for their home directories.
> In Windows I would simply modify group policy to deny logon, but we
> both know Linux knows nothing of a GPO. So without removing "/home",
> how would I prevent login?
>
> My plan now is to modify pam first, then if needed, do the keytab.

I would do it the other way, get everything to work and then if need be,
stop user login with PAM. If you install
the packages I suggested, PAM will do all the work for you initially.
You could also investigate a PAM module called 'pam_nologin' , you
should be able to guess what this does ;-)

Rowland

Ryan Ashley

unread,
Jul 29, 2014, 10:40:02 AM7/29/14
to
I will checkout the module later. Working is my top priority as you
stated. However, you have me curious now. If this keytab is created,
where the heck is it created? I am looking for it in /var/lib/samba,
/etc, and other places. None of my member servers have it and they all
seem to work, minus this stubborn one of course.

Also, I did a test earlier and wanted to share the results. This thing
keeps complaining about an idmap ad backend not being found, and I
honestly believe that is the issue, not Kerberos. I am trying your
suggestion because maybe this backend is stored in Kerberos, who knows.
Either way, I am being flooded with errors about this "idmap backend ad"
not being found.

Anyway, I had already added winbind to nsswitch.conf for users and
groups, so I wanted to verify the same UID/GID was being pulled. I wiped
the winbind idmap tdb files and rebooted. Got the same IDs after it
rebooted and created the files again, so no issue there. For example,
the "Domain Users" group always has an ID of 70001. That much is
working. So what in the heck does the missing backend do? Something is
already mapping domain users and groups to IDs, so I am scratching my
head on this one.

Rowland Penny

unread,
Jul 29, 2014, 11:00:02 AM7/29/14
to
On 29/07/14 15:33, Ryan Ashley wrote:
> I will checkout the module later. Working is my top priority as you
> stated. However, you have me curious now. If this keytab is created,
> where the heck is it created? I am looking for it in /var/lib/samba,
> /etc, and other places. None of my member servers have it and they all
> seem to work, minus this stubborn one of course.

If you set smb.conf up correctly and the run 'net ads join -U
Admini...@EXAMPLE.COM' , you should find that /etc/krb5.keytab is
created.

>
> Also, I did a test earlier and wanted to share the results. This thing
> keeps complaining about an idmap ad backend not being found, and I
> honestly believe that is the issue, not Kerberos. I am trying your
> suggestion because maybe this backend is stored in Kerberos, who
> knows. Either way, I am being flooded with errors about this "idmap
> backend ad" not being found.

The 'idmap backend ad' is part of winbind, and as such, should be
available. If I remember correctly you are using a S4 AD DC, can you
remember how you provisioned it ?

>
>
> Anyway, I had already added winbind to nsswitch.conf for users and
> groups, so I wanted to verify the same UID/GID was being pulled. I
> wiped the winbind idmap tdb files and rebooted. Got the same IDs after
> it rebooted and created the files again, so no issue there. For
> example, the "Domain Users" group always has an ID of 70001. That much
> is working. So what in the heck does the missing backend do? Something
> is already mapping domain users and groups to IDs, so I am scratching
> my head on this one.

The 'idmap backend ad' is one that pulls all the user and group info
from RFC2307 attributes on the AD server.

Rowland

Ryan Ashley

unread,
Jul 29, 2014, 11:20:02 AM7/29/14
to
I just checked and I only have */etc/krb5.conf* in */etc*. No keytab. I
am pasting the provision information from my history as root on the DC.

samba-tool domain provision --use-rfc2307 --interactive

I gave the domain the name "truevine.lan". I also noted that there is no
Kerberos keytab on the DC. I followed the guides to the letter in both
cases, and neither mention what you are telling me. I am not disputing
you, but if this stuff is required, it needs to be in the guide/wiki.
That is why I started asking questions. I understand the guides and have
been a Windows admin for years, but doing it with Samba is still new,
and I love it, though I must learn a standard way to do this so it will
always work.

Rowland Penny

unread,
Jul 29, 2014, 11:50:01 AM7/29/14
to
On 29/07/14 16:17, Ryan Ashley wrote:
> I just checked and I only have */etc/krb5.conf* in */etc*. No keytab.
> I am pasting the provision information from my history as root on the DC.
>
> samba-tool domain provision --use-rfc2307 --interactive
>
> I gave the domain the name "truevine.lan". I also noted that there is
> no Kerberos keytab on the DC. I followed the guides to the letter in
> both cases, and neither mention what you are telling me. I am not
> disputing you, but if this stuff is required, it needs to be in the
> guide/wiki. That is why I started asking questions. I understand the
> guides and have been a Windows admin for years, but doing it with
> Samba is still new, and I love it, though I must learn a standard way
> to do this so it will always work.

If you require the keytab on the Samba4 AD server (if you want to use
sssd for instance) you have to export it with

'samba-tool domain exportkeytab /etc/krb5.keytab'

This will put the keytab in /etc/krb5.keytab and you will then be able
to list the keytab with ktutil.

On a client or member server, the keytab should be created when you join
the domain.

This is the global part of the smb.conf on the laptop I am writing this on:

[global]
workgroup = EXAMPLE
security = ADS
realm = EXAMPLE.COM
#client signing = yes
dedicated keytab file = /etc/krb5.keytab
kerberos method = secrets and keytab
server string = Samba 4 Client %h
winbind enum users = yes
winbind enum groups = yes
winbind use default domain = yes
winbind expand groups = 4
winbind nss info = rfc2307
winbind refresh tickets = Yes
winbind offline logon = yes
winbind normalize names = Yes
idmap config * : backend = tdb
idmap config * : range = 2000-9999
idmap config EXAMPLE : backend = ad
idmap config EXAMPLE : range = 10000-999999
idmap config EXAMPLE : schema_mode = rfc2307
printcap name = cups
cups options = raw
usershare allow guests = yes
domain master = no
local master = no
preferred master = no
os level = 20
map to guest = bad user
username map = /etc/samba/smbmap
vfs objects = acl_xattr
map acl inherit = Yes
store dos attributes = Yes

The laptop runs samba4 in classic mode with users and groups having
uidNumber's & gidNumber's etc stored in AD, both ranges starting at 10000.

With the above smb.conf and all samba daemons stopped, if you now run

'net ads join -U Admini...@EXAMPLE.COM'

The machine should join the domain and /etc/krb5.keytab should be created.

You can read this with ktutil

sudo ktutil
ktutil: rkt /etc/krb5.keytab
ktutil: l
slot KVNO Principal
---- ----
---------------------------------------------------------------------
1 5 host/thinkpad.e...@EXAMPLE.COM
2 5 host/thinkpad.e...@EXAMPLE.COM
3 5 host/thinkpad.e...@EXAMPLE.COM
4 5 host/thinkpad.e...@EXAMPLE.COM
5 5 host/thinkpad.e...@EXAMPLE.COM
6 5 host/thin...@EXAMPLE.COM
7 5 host/thin...@EXAMPLE.COM
8 5 host/thin...@EXAMPLE.COM
9 5 host/thin...@EXAMPLE.COM
10 5 host/thin...@EXAMPLE.COM
11 5 THINKPAD$@EXAMPLE.COM
12 5 THINKPAD$@EXAMPLE.COM
13 5 THINKPAD$@EXAMPLE.COM
14 5 THINKPAD$@EXAMPLE.COM
15 5 THINKPAD$@EXAMPLE.COM
ktutil: q

You should now restart the samba daemons.

Rowland

Ryan Ashley

unread,
Jul 29, 2014, 12:00:02 PM7/29/14
to
I took it a step farther. I stopped the daemons, left the domain,
deleted everything in /var/lib/samba, uninstalled S4, rebooted, pulled
the latest stuff from 4-1-stable, configured and built it, installed it,
added the options you showed me to the configuration, joined the domain,
and verified everything. IDs are the same, the keytab WAS created, but
users still get access denied. So I am still nowhere for my efforts. At
least I have the keytab though.

So what is next? I am not running iptables or anything yet, because of
the issues. Windows ACLs are there and are correct. The domain admin is
the only one who can access the shares.

Rowland Penny

unread,
Jul 29, 2014, 12:20:01 PM7/29/14
to
On 29/07/14 16:52, Ryan Ashley wrote:
> I took it a step farther. I stopped the daemons, left the domain,
> deleted everything in /var/lib/samba, uninstalled S4, rebooted, pulled
> the latest stuff from 4-1-stable, configured and built it, installed
> it, added the options you showed me to the configuration, joined the
> domain, and verified everything. IDs are the same, the keytab WAS
> created, but users still get access denied. So I am still nowhere for
> my efforts. At least I have the keytab though.
>
> So what is next? I am not running iptables or anything yet, because of
> the issues. Windows ACLs are there and are correct. The domain admin
> is the only one who can access the shares.

I take it that 'wbinfo -u' shows all domain users, 'wbinfo -g' shows all
the domain groups, 'getent passwd' shows local and domain users, 'getent
group Domain\ Users' shows the info for the Domain users group ('getent
group' will not show any domain groups unless ALL domain groups have a
gidNumber).

Rowland

Ryan Ashley

unread,
Jul 29, 2014, 1:10:02 PM7/29/14
to
Yes, I see all domain users and groups, getent works with passwd and
with any domain group, and shows things as they should be. Every group
has a unique gid.

Rowland Penny

unread,
Jul 29, 2014, 1:20:02 PM7/29/14
to
On 29/07/14 18:01, Ryan Ashley wrote:
> Yes, I see all domain users and groups, getent works with passwd and
> with any domain group, and shows things as they should be. Every group
> has a unique gid.

OK, then on paper everything is working as it should be, I cannot think
of anything else to do, anybody else have any input ???

If nobody else has any input, it may be time to file a bug against samba.

Rowland

steve

unread,
Jul 29, 2014, 1:40:02 PM7/29/14
to
On Tue, 2014-07-29 at 09:01 -0400, Ryan Ashley wrote:

> Before I change anything, I would like to know what that keytab file
> does.

In kerberos, not only does the user have to authenticate, but also the
machine upon which the user is working on or the machine which is
offering the cifs service in the domain. The host/ and machine keys in
the keytab must match their originals in the KDC. samba can
automatically produce the correct keytab for you when you join the
domain.
HTH,
Steve

steve

unread,
Jul 29, 2014, 1:50:02 PM7/29/14
to
On Tue, 2014-07-29 at 18:18 +0100, Rowland Penny wrote:
> On 29/07/14 18:01, Ryan Ashley wrote:
> > Yes, I see all domain users and groups, getent works with passwd and
> > with any domain group, and shows things as they should be. Every group
> > has a unique gid.
>
> OK, then on paper everything is working as it should be, I cannot think
> of anything else to do, anybody else have any input ???
>
> If nobody else has any input, it may be time to file a bug against samba.

Hi
Our money is on the builtin acl which has started appearing in recent
samba versions and explained earlier in this thread. winbind maps this
group to a number in the idmap * range. This number does not coincide
with the hard wired xidNumber in the separate idmap db on the DC.

Otherwise, have one final check on winbind:
http://linuxcostablanca.blogspot.com.es/2014/06/samba4-winbind-desperation.html

If still nothing, go back to 4.1.6 or use sssd.
HTH,
Steve

Rowland Penny

unread,
Jul 29, 2014, 2:50:02 PM7/29/14
to
On 29/07/14 18:42, steve wrote:
> On Tue, 2014-07-29 at 18:18 +0100, Rowland Penny wrote:
>> On 29/07/14 18:01, Ryan Ashley wrote:
>>> Yes, I see all domain users and groups, getent works with passwd and
>>> with any domain group, and shows things as they should be. Every group
>>> has a unique gid.
>> OK, then on paper everything is working as it should be, I cannot think
>> of anything else to do, anybody else have any input ???
>>
>> If nobody else has any input, it may be time to file a bug against samba.
> Hi
> Our money is on the builtin acl which has started appearing in recent
> samba versions and explained earlier in this thread. winbind maps this
> group to a number in the idmap * range. This number does not coincide
> with the hard wired xidNumber in the separate idmap db on the DC.
>
> Otherwise, have one final check on winbind:
> http://linuxcostablanca.blogspot.com.es/2014/06/samba4-winbind-desperation.html
>
> If still nothing, go back to 4.1.6 or use sssd.
> HTH,
> Steve
>
>
Hi Steve, how about bug 10508 ??

https://bugzilla.samba.org/show_bug.cgi?id=10508

Rowland

steve

unread,
Jul 30, 2014, 7:50:01 AM7/30/14
to
On Tue, 2014-07-29 at 19:47 +0100, Rowland Penny wrote:
> On 29/07/14 18:42, steve wrote:
> > On Tue, 2014-07-29 at 18:18 +0100, Rowland Penny wrote:
> >> On 29/07/14 18:01, Ryan Ashley wrote:
> >>> Yes, I see all domain users and groups, getent works with passwd and
> >>> with any domain group, and shows things as they should be. Every group
> >>> has a unique gid.
> >> OK, then on paper everything is working as it should be, I cannot think
> >> of anything else to do, anybody else have any input ???
> >>
> >> If nobody else has any input, it may be time to file a bug against samba.
> > Hi
> > Our money is on the builtin acl which has started appearing in recent
> > samba versions and explained earlier in this thread. winbind maps this
> > group to a number in the idmap * range. This number does not coincide
> > with the hard wired xidNumber in the separate idmap db on the DC.
> >
> > Otherwise, have one final check on winbind:
> > http://linuxcostablanca.blogspot.com.es/2014/06/samba4-winbind-desperation.html
> >
> > If still nothing, go back to 4.1.6 or use sssd.
> > HTH,
> > Steve
> >
> >
> Hi Steve, how about bug 10508 ??
>
> https://bugzilla.samba.org/show_bug.cgi?id=10508
>
> Rowland
>
Hi Rowland,
Yes, it looks possible.
Could OP tell us if his ntadmins is local to /etc/group? Also, the what
does:
wbinfo --uid-to-sid=70028
give us?
Steve

Ryan Ashley

unread,
Jul 30, 2014, 10:20:01 AM7/30/14
to
Sorry for the delay. I am in eastern time and have been busy with
another project. I cannot convert that ID to SID. In Windows however,
this shows as "SYSTEM". How do I know? Simple, there are only three
things listed. Those are "Domain Admins", "Administration", and
"SYSTEM". Also, what do you mean by "ntadmins" being local? I have added
no groups to the Linux systems, so if you're asking if it is a local
group on the Linux box, no it is not. I can remove the SYSTEM account
from the share if needed, but it is on all Windows shares as well and
causes no issues.

failed to call wbcUidToSid: WBC_ERR_DOMAIN_NOT_FOUND
Could not convert uid 70028 to sid

Ryan Ashley

unread,
Jul 31, 2014, 12:10:04 PM7/31/14
to
I made a strange discovery this morning. If I attempt to map the drive
using the server's IP address, I get invalid password. If I attempt to
map it using the hostname, it flat out denies access.

C:\Users\reach_support>net use s: \\172.16.0.5\staff$ /persistent:no
Enter the user name for '172.16.0.5': reach_support
Enter the password for 172.16.0.5:
System error 86 has occurred.

The specified network password is not correct.


C:\Users\reach_support>net use s: \\fs01\staff$ /persistent:no
Enter the user name for 'fs01': reach_support
Enter the password for fs01:
System error 5 has occurred.

Access is denied.


C:\Users\reach_support>

This REALLY looks like an S4 bug to me. Why would it give different
errors if using a hostname versus the static IP? The hostname simply
resolves to the IP anyway. Is there anything we can do now?

Ryan Ashley

unread,
Aug 3, 2014, 12:20:01 AM8/3/14
to
I am still trying to get this to work. Is S4 incapable of being a
file-server as a member server? I run ONLY DNS and DHCP on my AD DC
servers. I have a dedicated S4 print server that appears to work
perfectly, but sharing files is critical and I have now been down for
three weeks. Winbind resolves users and groups, everything looks good, I
have tried what has been suggested before, but now I am becoming
desperate. The system cannot find this "idmap ad" backend. What in the
heck is it and how do I get it or build it? Everything is working except
this basic functionality which is REALLY need!

steve

unread,
Aug 3, 2014, 3:00:02 AM8/3/14
to
On Sun, 2014-08-03 at 00:19 -0400, Ryan Ashley wrote:
> I am still trying to get this to work. Is S4 incapable of being a
> file-server as a member server? I run ONLY DNS and DHCP on my AD DC
> servers. I have a dedicated S4 print server that appears to work
> perfectly, but sharing files is critical and I have now been down for
> three weeks. Winbind resolves users and groups, everything looks good, I
> have tried what has been suggested before, but now I am becoming
> desperate. The system cannot find this "idmap ad" backend. What in the
> heck is it and how do I get it or build it? Everything is working except
> this basic functionality which is REALLY need!

OK. Time to summarise.
smb.conf on DC
samba version on DC
samba version on working print server
smb.conf on working print server
the DN of the user who trips the 'idmap ad' error (ute)
host <hostname of DC>
host <hostname of print server>
host <ip of DC>
host <ip of print server>
getent passwd ute
groups ute
getfacl <path to share where ute is accessing>
/etc/fstab

With that we stand a chance.
Cheers,
Steve

Rowland Penny

unread,
Aug 3, 2014, 5:10:02 AM8/3/14
to
On 03/08/14 05:19, Ryan Ashley wrote:
> I am still trying to get this to work. Is S4 incapable of being a
> file-server as a member server? I run ONLY DNS and DHCP on my AD DC
> servers. I have a dedicated S4 print server that appears to work
> perfectly, but sharing files is critical and I have now been down for
> three weeks. Winbind resolves users and groups, everything looks good,
> I have tried what has been suggested before, but now I am becoming
> desperate. The system cannot find this "idmap ad" backend. What in the
> heck is it and how do I get it or build it? Everything is working
> except this basic functionality which is REALLY need!
>
Can you please post the info that Steve has requested plus:

Remind us what OS you are using.
How are you setting up the member server, are you provisioning it ?
How are you running dns & dhcp, are you using bind9 and how is dhcp
updating dns
Are you running the separate winbind daemon ?

Rowland

Ryan Ashley

unread,
Aug 4, 2014, 2:30:02 PM8/4/14
to
DC Config:
=======
# Global parameters
[global]
workgroup = TRUEVINE
realm = TRUEVINE.LAN
netbios name = DC01
server role = active directory domain controller
server services = s3fs, rpc, nbt, wrepl, ldap, cldap, kdc,
drepl, winbi$
idmap_ldb:use rfc2307 = yes

[netlogon]
path = /var/lib/samba/sysvol/truevine.lan/scripts
read only = No

[sysvol]
path = /var/lib/samba/sysvol
read only = No



Print-Server Config:
============
[global]
netbios name = ps01
workgroup = TRUEVINE
security = ADS
realm = TRUEVINE.LAN
encrypt passwords = yes

idmap config *:backend = tdb
idmap config *:range = 70001-80000
idmap config SAMDOM:backend = ad
idmap config SAMDOM:schema_mode = rfc2307
idmap config SAMDOM:range = 500-40000

winbind nss info = rfc2307
winbind trusted domains only = no
winbind use default domain = yes
winbind enum users = yes
winbind enum groups = yes

auth methods = winbind
rpc_server:spoolss = external
rpc_daemon:spoolssd = fork
spoolss: architecture = Windows x64

[printers]
path = /var/spool/samba
printable = yes
printing = CUPS

[print$]
path = /srv/samba/printer_drivers
comment = Printer drivers
writeable = yes

[Xerox7545]
path = /var/spool/samba
browseable = yes
printable = yes
printer name = Xerox_WC_7545



File-Server Config:
===========
[global]
netbios name = FS01
workgroup = TRUEVINE
security = ADS
realm = TRUEVINE.LAN
encrypt passwords = yes
dedicated keytab file = /etc/krb5.keytab
kerberos method = secrets and keytab

idmap config *:backend = tdb
idmap config *:range = 70001-80000
idmap config TRUEVINE:backend = ad
idmap config TRUEVINE:schema_mode = rfc2307
idmap config TRUEVINE:range = 500-40000

winbind nss info = rfc2307
winbind trusted domains only = no
winbind use default domain = yes
winbind enum users = yes
winbind enum groups = yes

vfs objects = acl_xattr
map acl inherit = yes
store dos attributes = yes
auth methods = winbind
log level = 3

[install$]
path = /home/shared/install
comment = "Software installation files"
read only = no
guest ok = no

[staff$]
path = /home/shared/staff
comment = "Staff file share"
read only = no
guest ok = no

[fbc$]
path = /home/shared/fbc
comment = "Family Bible College file share"
read only = no
guest ok = no



IP Information:
=========
Note that I do have a reverse-DNS zone setup in AD but it NEVER works
with S4. Works fine in 2008 R2, 2008, 2003 R2, etc. Being that I read
hundreds of posts of people never getting it working in S4, I assume it
is broken and am not worried about it yet.

root@fs01:~# host dc01
dc01.truevine.lan has address 172.16.0.1
root@fs01:~# host ps01
ps01.truevine.lan has address 172.16.0.7
root@fs01:~# host 172.16.0.1
Host 1.0.16.172.in-addr.arpa. not found: 3(NXDOMAIN)
root@fs01:~# host 172.16.0.7
Host 7.0.16.172.in-addr.arpa. not found: 3(NXDOMAIN)



Other:
====
root@fs01:~# getfacl /home/shared/staff/
getfacl: Removing leading '/' from absolute path names
# file: home/shared/staff/
# owner: reachfp
# group: administration
# flags: -s-
user::rwx
user:70014:rwx
group::rwx
group:fbc:rwx
group:70020:rwx
group:70028:rwx
mask::rwx
other::---
default:user::rwx
default:user:70014:rwx
default:group::---
default:group:fbc:rwx
default:group:70020:rwx
default:group:70028:rwx
default:mask::rwx
default:other::---

root@fs01:~# getfacl /home/shared/fbc/
getfacl: Removing leading '/' from absolute path names
# file: home/shared/fbc/
# owner: reachfp
# group: fbc
# flags: -s-
user::rwx
user:70014:rwx
group::rwx
group:70013:rwx
group:70020:rwx
group:70028:rwx
mask::rwx
other::---
default:user::rwx
default:user:70014:rwx
default:group::---
default:group:70013:rwx
default:group:70020:rwx
default:group:70028:rwx
default:mask::rwx
default:other::---

root@fs01:~# l /home/shared/
total 40
drwxrws---+ 6 reachfp fbc 4096 Jul 23 11:31 fbc
drwxrws---+ 8 reachfp domain computers 4096 Jul 23 11:14 install
drwx------ 2 root root 16384 Jul 15 10:00 lost+found
drwxrws---+ 13 reachfp administration 4096 Jul 23 11:30 staff

As you can see, getfacl is using ID numbers, but they do resolve to
groups when using ls. This is confusing as heck. This core functionality
should just work. Winbind is running, those IDs resolve to groups, but
getfacl cannot resolve them? What in the heck is missing here? I
followed the guide to the letter!

Finally, I do not know what this DN is. Domain Name? That is TRUEVINE,
FQDN is truevine.lan. As far as causing the error, everybody in the
entire domain causes it EXCEPT the domain admin. Also, what is "ute"?

Rowland Penny

unread,
Aug 4, 2014, 3:00:02 PM8/4/14
to
Funny that, the reverse-dns zone never working with S4, that is. It
works for me and has been doing for quite some time, but you never
answered how you are running the dns & dhcp, are you using the internal
dns server or bind9 ? how are you getting dhcp to update dns ?
The ID numbers that you have posted are in the 'builtin' range
'70001-80000', probably the best way out of your problem is to trace the
users & groups that these numbers match and then give them uidNumber's &
gidNumber's.
>
> Finally, I do not know what this DN is. Domain Name? That is TRUEVINE,
> FQDN is truevine.lan. As far as causing the error, everybody in the
> entire domain causes it EXCEPT the domain admin. Also, what is "ute"?
>

DN stands for distinguished name, for instance, the DN of Administrator
on your AD DC will be CN=Administrator,CN=User,DC=truevine,DC=lan

truevine.lan is NOT the FQDN, that would be DC01.truevine.lan for
instance, truevine.lan is the domain name or kerberos realm.

Haven't a clue what 'ute' is, perhaps Steve does ??

Rowland

Ryan Ashley

unread,
Aug 4, 2014, 3:20:02 PM8/4/14
to
I forgot to mention, I am running BIND9. I created the reverse zones in
AD using the snap-in on a Windows 7 Pro 64bit system. DHCP does update
DNS, but the reverse zones are always ignored, at all locations. I also
forgot to mention that all three systems are running 4.1.10 stable. They
were running 4.2.0 pre something.

How do I give these groups uID or gID numbers? Are you suggesting I
create them on the Linux box?

Finally, the DN should not matter since it affects all users, and that
is a LOT of typing for ever domain user. If it is required I will do it,
but since only the domain admin can do this, it seems as though a user's
DN is irrelevant. If it was some users and not others, I'd have already
checked the groups, DN, etc.


On 08/04/2014 02:58 PM, Rowland Penny wrote:
> On 04/08/14 19:24, Ryan Ashley wrote:
>
> Funny that, the reverse-dns zone never working with S4, that is. It
> works for me and has been doing for quite some time, but you never
> answered how you are running the dns & dhcp, are you using the
> internal dns server or bind9 ? how are you getting dhcp to update dns ?
>
>
> The ID numbers that you have posted are in the 'builtin' range
> '70001-80000', probably the best way out of your problem is to trace
> the users & groups that these numbers match and then give them
> uidNumber's & gidNumber's.
>

Davor Vusir

unread,
Aug 4, 2014, 3:30:01 PM8/4/14
to
I think you get the 70xxx numbers and acces denied because you are
using "secrets and keytab". Change to "system keytab". See also
http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#KERBEROSMETHOD

Regards
Davor

Rowland Penny

unread,
Aug 4, 2014, 3:30:02 PM8/4/14
to
On 04/08/14 20:12, Ryan Ashley wrote:
> I forgot to mention, I am running BIND9. I created the reverse zones
> in AD using the snap-in on a Windows 7 Pro 64bit system. DHCP does
> update DNS, but the reverse zones are always ignored, at all
> locations. I also forgot to mention that all three systems are running
> 4.1.10 stable. They were running 4.2.0 pre something.

Please post dhcpd.conf from your samba4 AD DC, the setup works with
bind9.9 and dhcp, but it must be correctly set up.

>
> How do I give these groups uID or gID numbers? Are you suggesting I
> create them on the Linux box?

Probably easiest if you the windows RSAT tools (ADUC) on a windows
machine, but then again you should already be doing this seeing as how
you are using the winbind ad idmap backend.

Rowland

Rowland Penny

unread,
Aug 4, 2014, 3:40:02 PM8/4/14
to
I doubt it, I have exactly the same line in smb.conf and this is from a
demo share:

getfacl /home/Demo
getfacl: Removing leading '/' from absolute path names
# file: home/Demo
# owner: rowland
# group: Domain\040Users
user::rwx
user:root:rwx
user:rowland:rwx
group::r-x
group:root:r-x
group:Domain\040Users:r-x
mask::rwx
other::r-x
default:user::rwx
default:user:root:rwx
default:user:rowland:rwx
default:group::rwx
default:group:root:rwx
default:group:Domain\040Users:rwx
default:mask::rwx
default:other::r-x

No ID numbers there ;-)

Rowland

steve

unread,
Aug 4, 2014, 4:30:02 PM8/4/14
to
On Mon, 2014-08-04 at 21:23 +0200, Davor Vusir wrote:

> I think you get the 70xxx numbers and acces denied because you are
> using "secrets and keytab". Change to "system keytab". See also
> http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#KERBEROSMETHOD

I doubt whether that's the reason although Kerberos freaks will tell you
that the machine should authenticate itself via a keytab, not a
database. As a ctdb user, we all know how we can fool secrets into
telling all manner of statistics;)
HTH,

Ryan Ashley

unread,
Aug 4, 2014, 7:20:01 PM8/4/14
to
DHCP Configuration:
==================
ddns-update-style none;
option domain-name "truevine.lan";
option domain-name-servers 172.16.0.1,172.16.0.2;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;
subnet 172.16.0.0 netmask 255.255.252.0 {
range 172.16.2.1 172.16.2.100;
option routers 172.16.0.254;
option broadcast-address 172.16.3.255;
}

And I just realized I never finished setting up DNS updates. Well that
explains the reverse-DNS issue. I can handle that as I have it working
at my office (S4 DC, Win 7 clients) and that will fix the reverse-lookup
issue.
Now how are you proposing I assign ID numbers to groups? I have NEVER
had to or actually done that in the Windows world, and have not had to
do it since I started using S4 two years ago. Also, will assigning ID
numbers break all the other things on my network? I have four storage
devices joined to the domain using AD authentication for file shares and
they work fine. I do not want to break everything for this if possible.

Davor Vusir

unread,
Aug 5, 2014, 12:40:01 AM8/5/14
to
2014-08-04 22:26 GMT+02:00 steve <st...@steve-ss.com>:
> On Mon, 2014-08-04 at 21:23 +0200, Davor Vusir wrote:
>
>> I think you get the 70xxx numbers and acces denied because you are
>> using "secrets and keytab". Change to "system keytab". See also
>> http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#KERBEROSMETHOD
>
> I doubt whether that's the reason although Kerberos freaks will tell you
> that the machine should authenticate itself via a keytab, not a
> database. As a ctdb user, we all know how we can fool secrets into
> telling all manner of statistics;)
> HTH,
> Steve
>
>
I see.

In that case it might just be a lingering init-script from a previous
installation that starts winbind with the original smb.conf using
tdb-files in another location. Or does the server need to be re-joined
to the domain?

Regards
Davor

steve

unread,
Aug 5, 2014, 4:20:01 AM8/5/14
to
On Mon, 2014-08-04 at 19:11 -0400, Ryan Ashley wrote:


> Now how are you proposing I assign ID numbers to groups? I have NEVER
> had to or actually done that in the Windows world,

Hi
It's not a case of us proposing. It's you _telling_ us:
idmap config SAMDOM:backend = ad

BTW, you still have conflicting names in your file server smb.conf

HTH,

steve

unread,
Aug 5, 2014, 4:30:01 AM8/5/14
to
On Tue, 2014-08-05 at 06:33 +0200, Davor Vusir wrote:
> 2014-08-04 22:26 GMT+02:00 steve <st...@steve-ss.com>:
> > On Mon, 2014-08-04 at 21:23 +0200, Davor Vusir wrote:
> >
> >> I think you get the 70xxx numbers and acces denied because you are
> >> using "secrets and keytab". Change to "system keytab". See also
> >> http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#KERBEROSMETHOD
> >
> > I doubt whether that's the reason although Kerberos freaks will tell you
> > that the machine should authenticate itself via a keytab, not a
> > database. As a ctdb user, we all know how we can fool secrets into
> > telling all manner of statistics;)
> > HTH,
> > Steve
> >
> >
> I see.
>
> In that case it might just be a lingering init-script from a previous
> installation that starts winbind with the original smb.conf using
> tdb-files in another location. Or does the server need to be re-joined
> to the domain?
>
> Regards
> Davor
Hi
+1 absolutely for that. Make sure there is only one version of smbd on
the file server;)

Rowland Penny

unread,
Aug 5, 2014, 4:40:01 AM8/5/14
to
Here is my working dhcpd.conf:

default-lease-time 14400;
max-lease-time 14400;
authoritative;

subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.21 192.168.0.229;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option time-offset 0;
option routers 192.168.0.1;
option domain-name "example.com";
option domain-name-servers 192.168.0.5;
option domain-search "example.com";
option netbios-name-servers 192.168.0.5;
option ntp-servers 192.168.0.5;
}

on commit {
set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
set ClientDHCID = binary-to-ascii(16, 8, ":", hardware);
set ClientName = pick-first-value(option host-name,
config-option-host-name, client-name);
log(concat("Commit: IP: ", ClientIP, " DHCID: ", ClientDHCID, " Name: ",
ClientName));
execute("/usr/local/sbin/dhcp-dyndns.sh", "add", ClientIP, ClientDHCID,
ClientName);
}

on release {
set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
set ClientDHCID = binary-to-ascii(16, 8, ":", hardware);
log(concat("Release: IP: ", ClientIP));
execute("/usr/local/sbin/dhcp-dyndns.sh", "delete", ClientIP, ClientDHCID);
}

Notice any differences ???

Are you by any chance using the un-recomended Bind9 flat file backend ?

Rowland

Ryan Ashley

unread,
Aug 5, 2014, 8:50:01 AM8/5/14
to
Thanks, Rowland. The one here at my office is very similar to yours.
I'll worry about that later today.

As to the two suggesting an older version or different location of TDB
files, not possible. This is a brand-new server running XenServer with
all three VMs running on it. DC01, PS01, and FS01 are ALL on the same
physical hardware. On top of that, when I rebuild, I use the exact same
parameters every time to avoid issues. My configuration command is
listed below. This exact parameter is used every single time I update S4.

./configure --enable-fhs --prefix=/usr --localstatedir=/var
--sysconfdir=/etc

Now, the "idmap = ad" thing is in the guide. I followed the guide, but
none of these parameters are documented or commented so I am completely
lost as to what they do. I just follow the guide and expect it to work,
which it has until this one case. Comments in the configuration files
would REALLY help me understand this stuff more. I still have no clue
what 75% of the configuration does.

Either way, I just want to share files with AD groups. If this is the
wrong way, what is the right way? Again, my config is STRAIGHT from the
guide.

Ryan Ashley

unread,
Aug 5, 2014, 9:00:01 AM8/5/14
to
I changed "SAMDOM" on the print-server to "TRUEVINE". I then removed
"winbind_cache.tdb", "winbind_idmap.tdb", and "group_mapping.tdb" and
rebooted the server. All seems to be well.

steve

unread,
Aug 5, 2014, 9:00:02 AM8/5/14
to
On Tue, 2014-08-05 at 08:44 -0400, Ryan Ashley wrote:
> Thanks, Rowland. The one here at my office is very similar to yours.
> I'll worry about that later today.
>
> As to the two suggesting an older version or different location of TDB
> files, not possible. This is a brand-new server running XenServer with
> all three VMs running on it. DC01, PS01, and FS01 are ALL on the same
> physical hardware. On top of that, when I rebuild, I use the exact same
> parameters every time to avoid issues. My configuration command is
> listed below. This exact parameter is used every single time I update S4.
>
> ./configure --enable-fhs --prefix=/usr --localstatedir=/var
> --sysconfdir=/etc

What distribution did you install on the VMs? It is rare that a Linux
disribution will not install samba.
>
> Now, the "idmap = ad" thing is in the guide. I followed the guide, but
> none of these parameters are documented or commented so I am completely
> lost as to what they do. I just follow the guide and expect it to work,
> which it has until this one case. Comments in the configuration files
> would REALLY help me understand this stuff more. I still have no clue
> what 75% of the configuration does.

It assumes you know about it. Linux documentation nearly always does.
All it means is that you will need to add a minimum of gidNumber to the
groups you wish your users to be members of. Then a minimum of uidNumber
to the users. You can do that when you create the users but you need
ldbmodify on the DC itself for the groups. Apart from that, the guide is
more or less complete. If you want full documentation, you will have to
go with microsoft.
HTH,
Steve

Rowland Penny

unread,
Aug 5, 2014, 9:30:01 AM8/5/14
to
On 05/08/14 13:44, Ryan Ashley wrote:
> Thanks, Rowland. The one here at my office is very similar to yours.
> I'll worry about that later today.
>
> As to the two suggesting an older version or different location of TDB
> files, not possible. This is a brand-new server running XenServer with
> all three VMs running on it. DC01, PS01, and FS01 are ALL on the same
> physical hardware. On top of that, when I rebuild, I use the exact
> same parameters every time to avoid issues. My configuration command
> is listed below. This exact parameter is used every single time I
> update S4.

Can I suggest that, as you are using Wheezy, you either use samba4 from
backports (this gets you 4.1.9) or use the sernet packages, this will
put samba into standard directories that most people are using now.

>
> ./configure --enable-fhs --prefix=/usr --localstatedir=/var
> --sysconfdir=/etc
>
> Now, the "idmap = ad" thing is in the guide. I followed the guide, but
> none of these parameters are documented or commented so I am
> completely lost as to what they do. I just follow the guide and expect
> it to work, which it has until this one case. Comments in the
> configuration files would REALLY help me understand this stuff more. I
> still have no clue what 75% of the configuration does.
>

Welcome to Linux ;-) The software is great but the documentation could
be better. The best place to start would be on the samba wiki:

https://wiki.samba.org/index.php/Main_Page

You can also read the manpages, to find out what all those lines in
smb.con mean: 'man smb.conf'
Or 'package name --help' will give you usage instructions i.e.
'samba-tool --help'

Rowland

Ryan Ashley

unread,
Aug 5, 2014, 1:20:02 PM8/5/14
to
The way that sounds, the "file server" guide is incomplete, because
nowhere does it mention any of what you're telling me. I also have
little trouble finding good documentation on every Linux product I use.
S4 is the one big exception, but with the guides, it eliminates some of
that need. I do not buy the whole argument of using Windows for
documentation, because 90% of their documentation is rambling crud. When
you get an error and have an ID, the docs don't have the ID you want,
you are hosed.

Again, I am running Debian Wheezy 7.5 64bit under XenServer 6.2 with the
latest updates. The stable repos have an OLD version of S4, and I do not
mind building it myself anyway.

Finally, you have told me I need this and that, but no direction is
noted. How do I assign this stuff and why does this ONE system need it
when all the others don't? I would also believe that if I MUST assign
IDs to make file-sharing work, that my other setups (dozens of them)
would be long broken by now since I have never done it in the past. I
also know that even removing and rejoining the domain results in the
exact same IDs for those directories in my shared directory. That tells
me somehow the IDs resolve the same.

My guess here, is that you're telling me I need to assign these IDs so
winbind does not have to resolve them. In other words, when a user
accesses the share, the ID is associated with the group and it sends
that along with the request, which even the Linux stuff can understand
(ie: ID 4000 can access a directory owned by ID 4000). Am I correct here?

Oh and Rowland, I have been using Linux since before 2000. This is the
only major issue I have EVER encountered where a standard setup working
in dozens of locations is failing in this one. We deploy Linux as often
as Windows here, and we have become GOOD at using and working with it.
We use Debian, naturally.

Rowland Penny

unread,
Aug 5, 2014, 2:00:02 PM8/5/14
to
On 05/08/14 18:17, Ryan Ashley wrote:
> The way that sounds, the "file server" guide is incomplete, because
> nowhere does it mention any of what you're telling me. I also have
> little trouble finding good documentation on every Linux product I
> use. S4 is the one big exception, but with the guides, it eliminates
> some of that need. I do not buy the whole argument of using Windows
> for documentation, because 90% of their documentation is rambling
> crud. When you get an error and have an ID, the docs don't have the ID
> you want, you are hosed.
>
> Again, I am running Debian Wheezy 7.5 64bit under XenServer 6.2 with
> the latest updates. The stable repos have an OLD version of S4, and I
> do not mind building it myself anyway.

OK, this is your decision, I just pointed out that you can get 4.1.9
from backports, this works, I know this because it is what I use.

>
> Finally, you have told me I need this and that, but no direction is
> noted. How do I assign this stuff and why does this ONE system need it
> when all the others don't? I would also believe that if I MUST assign
> IDs to make file-sharing work, that my other setups (dozens of them)
> would be long broken by now since I have never done it in the past. I
> also know that even removing and rejoining the domain results in the
> exact same IDs for those directories in my shared directory. That
> tells me somehow the IDs resolve the same.
>
> My guess here, is that you're telling me I need to assign these IDs so
> winbind does not have to resolve them. In other words, when a user
> accesses the share, the ID is associated with the group and it sends
> that along with the request, which even the Linux stuff can understand
> (ie: ID 4000 can access a directory owned by ID 4000). Am I correct here?

Windows uses SID's and RID's, Linux has not got a clue what these mean,
so you need to use an interpretor, this is where winbind, sssd etc come
in. You can do it two ways (at least), you either take the RID and use
this to create a users ID number or you give your users & groups RFC2307
numbers. There are pro's & con's for both, but for me, using RFC2307
attributes wins out, using these means that users & groups get correctly
identified everywhere. Using the RFC2307 attributes is actually the way
that windows wants you to connect to Linux, this is why they created
'Service for NIS'.

>
> Oh and Rowland, I have been using Linux since before 2000. This is the
> only major issue I have EVER encountered where a standard setup
> working in dozens of locations is failing in this one. We deploy Linux
> as often as Windows here, and we have become GOOD at using and working
> with it. We use Debian, naturally.
>

Well I have been using Linux since well before that, but I must be an
idiot because I can get Samba4 to work with both windows & Linux
clients, along with bind9, dhcp etc just by reading the documentation
and surfing the net!

It actually doesn't matter what OS you use, as long as it is a
maintained recent version, some people swear by Red Hat for instance,
others just swear at it ;-)

Ryan Ashley

unread,
Aug 5, 2014, 2:10:02 PM8/5/14
to
I provisioned with rfc2307 specified and it is in my domain controller's
smb.conf. I added the line about using rfc2307 to my print-server and
file-server. No change though. Is that line only for domain controllers?

Also, I have been all over ADUC looking for the "UNIX Attributes" tab
but cannot find it. Why won't it show up with an S4 DC provisioned with
rfc2307? This may be the problem, though so far every ID has been
perfect and the same across both servers.

steve

unread,
Aug 5, 2014, 2:20:03 PM8/5/14
to
On Tue, 2014-08-05 at 13:17 -0400, Ryan Ashley wrote:
> The way that sounds, the "file server" guide is incomplete, because
> nowhere does it mention any of what you're telling me. I also have
> little trouble finding good documentation on every Linux product I use.
> S4 is the one big exception, but with the guides, it eliminates some of
> that need. I do not buy the whole argument of using Windows for
> documentation, because 90% of their documentation is rambling crud. When
> you get an error and have an ID, the docs don't have the ID you want,
> you are hosed.
Unless you know what you're doing, the time it takes to get up on
user-land Linux compared with enterprise or microsoft
out-of-the-box-or-just-call-the-engineer is false economy.
>
> Again, I am running Debian Wheezy 7.5 64bit under XenServer 6.2 with the
> latest updates. The stable repos have an OLD version of S4, and I do not
> mind building it myself anyway.
Debian doesn't install samba unless you tell it?
>
> Finally, you have told me I need this and that, but no direction is
> noted.
http://bit.ly/1s8LTZc

Stuart Naylor

unread,
Aug 5, 2014, 2:30:01 PM8/5/14
to
I use the sernet binaries as they are very rapid in there releases.

http://www.enterprisesamba.com/samba/

Great to have so many distro's supported.

Backports or Archlinux is usually a day after a fresh release.

Documentation wise things are not good guys.

I have been on the samba4 trail for some time now and yeah I know where I am at now.
There is a load of confusing almost opposing documentation sometimes its hard to differentiate between versions.

The result is great when you get things going and the coding effort is just amazing.

Doc wise guys and know offence things suck.

Also it must be such a chore to keep repeating things on a mail list.
So much great knowledge just slips through time.

A forum would add much but you guys have your hands full, but sometimes the extra workload means future workload is less.

Anyway thanks for a super product even if the documentation at times is a little barren or confusing.

Stuart



-----Original message-----
> From:Rowland Penny <rowlan...@googlemail.com>
> Sent: Tuesday 5th August 2014 18:50
> To: sa...@lists.samba.org
> Subject: Re: [Samba] Samba 4 AD share: Access denied
>
> On 05/08/14 18:17, Ryan Ashley wrote:
> > The way that sounds, the "file server" guide is incomplete, because
> > nowhere does it mention any of what you're telling me. I also have
> > little trouble finding good documentation on every Linux product I
> > use. S4 is the one big exception, but with the guides, it eliminates
> > some of that need. I do not buy the whole argument of using Windows
> > for documentation, because 90% of their documentation is rambling
> > crud. When you get an error and have an ID, the docs don't have the ID
> > you want, you are hosed.
> >
> > Again, I am running Debian Wheezy 7.5 64bit under XenServer 6.2 with
> > the latest updates. The stable repos have an OLD version of S4, and I
> > do not mind building it myself anyway.
>
> OK, this is your decision, I just pointed out that you can get 4.1.9
> from backports, this works, I know this because it is what I use.
>
> >
> > Finally, you have told me I need this and that, but no direction is

Ryan Ashley

unread,
Aug 5, 2014, 2:40:01 PM8/5/14
to
Well, again, no issues until now. I never did the Kerberos keytab thing
before, and everything works. Never did the NIS thing before, and
everything works. Now I am learning these things should be done and I
have been told what to do and have done them as well as documented them
in our technical reference. However, I am now at the point where I
cannot set ID's due to not having the UNIX tab in ADUC. I did provision
with "--use-rfc2307" and it is in all of my S4 configuration files, but
no luck yet. What do I need to check to get that tab to appear? If
assigning an ID fixes this, I will HAPPILY do it on all of our domains
as we go out for maintenance.

Rowland Penny

unread,
Aug 5, 2014, 2:40:03 PM8/5/14
to
On 05/08/14 19:07, Ryan Ashley wrote:
> I provisioned with rfc2307 specified and it is in my domain
> controller's smb.conf. I added the line about using rfc2307 to my
> print-server and file-server. No change though. Is that line only for
> domain controllers?

All provisioning with RFC2307 does is add the ypServ30.ldif, it does not
do anything else, it is up to you to use it.

>
> Also, I have been all over ADUC looking for the "UNIX Attributes" tab
> but cannot find it. Why won't it show up with an S4 DC provisioned
> with rfc2307? This may be the problem, though so far every ID has been
> perfect and the same across both servers.

This is a known windows problem, search Google (other search providers
are available) for a solution.

Rowland

Gregory Sloop

unread,
Aug 5, 2014, 2:50:03 PM8/5/14
to


RA> Well, again, no issues until now. I never did the Kerberos keytab thing
RA> before, and everything works. Never did the NIS thing before, and
RA> everything works. Now I am learning these things should be done and I
RA> have been told what to do and have done them as well as documented them
RA> in our technical reference. However, I am now at the point where I
RA> cannot set ID's due to not having the UNIX tab in ADUC. I did provision
RA> with "--use-rfc2307" and it is in all of my S4 configuration files, but
RA> no luck yet. What do I need to check to get that tab to appear? If
RA> assigning an ID fixes this, I will HAPPILY do it on all of our domains
RA> as we go out for maintenance.

RA> On 08/05/2014 02:16 PM, steve wrote:
>> On Tue, 2014-08-05 at 13:17 -0400, Ryan Ashley wrote:
>>> The way that sounds, the "file server" guide is incomplete, because
>>> nowhere does it mention any of what you're telling me. I also have
>>> little trouble finding good documentation on every Linux product I use.
>>> S4 is the one big exception, but with the guides, it eliminates some of
>>> that need. I do not buy the whole argument of using Windows for
>>> documentation, because 90% of their documentation is rambling crud. When
>>> you get an error and have an ID, the docs don't have the ID you want,
>>> you are hosed.
>> Unless you know what you're doing, the time it takes to get up on
>> user-land Linux compared with enterprise or microsoft
>> out-of-the-box-or-just-call-the-engineer is false economy.
>>> Again, I am running Debian Wheezy 7.5 64bit under XenServer 6.2 with the
>>> latest updates. The stable repos have an OLD version of S4, and I do not
>>> mind building it myself anyway.
>> Debian doesn't install samba unless you tell it?
>>> Finally, you have told me I need this and that, but no direction is
>>> noted.
>> http://bit.ly/1s8LTZc


I've followed this thread since it started - and while I don't have technical help to offer, since I've not followed the technical details carefully - I'd thought I'd say this, even at the risk of being seen to "meddle" where I shouldn't.

I'll try to be gentle about it, but you've hopped all over the place. ...claimed that revereses in DNS didn't work, but then found you hadn't finished configuring DNS etc.

Just SLOW DOWN! Yeah, the docs can be skimpy, and things can be a bit confusing - but SLOW DOWN - tackle one thing at a time. Don't make a thousand changes and keep moving the goal-posts all over the field.

I know Rowland/Steve/Marc will almost certainly be able to resolve your issue. But it's going to take careful, methodical steps through each part. And, IMO, you haven't done that very well. Sometimes you'll answer a few of the underlying questions, and leave out others. [Not sure why, perhaps you missed them, but often it seems you're doing it because you're frustrated and want a solution right this second.]

If I were helping you, I'd be quite frustrated at the effort. The guys helping you are the best on the list. Short of a Samba dev person hopping in to verify a particular bug, there's not better help to be had. So, no matter if it worked three weeks ago or not, if you want help, and it's not working, and you'd like for it to work - go gentle on the help you ARE getting. Being frustrated with them won't help.

I suppose you could run a SerNet package and pay SerNet to solve your problems/do Samba consulting. But you're not paying anyone and they're spending a lot of time trying to help you...

Please try to be gentle and appreciative...

As an aside:
I'd guess you don't have a UNIX tab because the Samba AD schema doesn't have it. I'm not sure why that would be, since I don't use any of the UNIX AD extensions myself.

steve

unread,
Aug 5, 2014, 3:00:03 PM8/5/14
to
On Tue, 2014-08-05 at 14:32 -0400, Ryan Ashley wrote:
> I am now at the point where I
> cannot set ID's due to not having the UNIX tab in ADUC. I did provision
> with "--use-rfc2307" and it is in all of my S4 configuration files, but
> no luck yet.

You do not need to provision with rfc2307 nor do you need a UNIX tab to
allocate uidNumbers. You already have what you need. Please try it.

Davor Vusir

unread,
Aug 5, 2014, 4:20:03 PM8/5/14
to
2014-08-05 20:32 GMT+02:00 Ryan Ashley <ry...@reachtechfp.com>:
> Well, again, no issues until now. I never did the Kerberos keytab thing
> before, and everything works. Never did the NIS thing before, and everything
> works. Now I am learning these things should be done and I have been told
> what to do and have done them as well as documented them in our technical
> reference. However, I am now at the point where I cannot set ID's due to not
> having the UNIX tab in ADUC. I did provision with "--use-rfc2307" and it is
> in all of my S4 configuration files, but no luck yet. What do I need to
> check to get that tab to appear? If assigning an ID fixes this, I will
> HAPPILY do it on all of our domains as we go out for maintenance.
>

You have to activate advanced features in ADUC and edit the attributes
from the attribute editor tab.

It's a pity we couldn't help you sort this out. I think it's quite
strange that it doesn't work at this particular server as you say that
this is the standard way of yours to configure Samba. Why it doesn't
work, I really don't know. One thing that springs to mind is, and I
don't have knowledge enough to back it up, when using the TDB backend
you're not guaranteed consistent id mapping through the server park. I
have found nothing that states that winbind populates the
tdb-databases in a certain order (a-z, ascending SID numbering or
other mechanism). Which of course might give you different uidnumbers
(from the *:range) for different accounts. Please correct me if I'm
wrong. Is there a way to check this?

But I do think that Rowland and Steve are right to 'push' for
populating and using uid- and gidnumbers. uid- and gidnumbers with an
interpretator like winbind, sssd or other is a/the bridge between
Linux and windows. And it's a low-cost activation and maintenance. I
think you should consider their advice and rethink your setup.

Well, I'm out of ideas except that I have noticed that the activation
of vfs module acl_xattr in the global section of smb.conf does not
always/ever work on a mounted volume created from LVM. You might need
to/have to put it in the share section.

If you find out what caused this, please let us know.

Regards
Davor

Ricky Nance

unread,
Aug 6, 2014, 12:00:02 AM8/6/14
to
So IF I read the 70+ previous mails correctly, it looks like you have
tried both packages and samba source, if this is the case you could
have some seriously screwed up library files, causing various issues
(such as binaries just crashing at certain points). With that said,
there is a fair chance that your libnss_winbind.so (or so.2) is
mismatched from your current winbind causing exactly this issue.

Is there any chance you can give us a current recap of your
issue/setup? Include current configs (if you need to mask something,
make that clear). Also please provide the output of getent passwd |
grep ADUSER (replace ADUSER with an actual user) and which setup
(package or source, and which package you are using) you currently
have (as well as what you have tried there too).

Thanks,
Ricky

Ryan Ashley

unread,
Aug 6, 2014, 12:30:01 AM8/6/14
to
Plenty of replies since this afternoon! I will try to answer your
questions in order, as well as ask questions.

"All provisioning with RFC2307 does is add the ypServ30.ldif, it does
not do anything else, it is up to you to use it. "

Alright, how? Remember, all my domains are golden except this. I have
never had to use ldif files or assign ID numbers because they always
just worked.

"This is a known windows problem, search Google (other search providers
are available) for a solution."

I have been searching, and I have tried loads of results, to no avail.
Some said install libnss-ldapd, which I still don't know what it does,
others said to do various config entries, also to no avail, so I am back
here. I have reverted my changes since nothing worked.

"I'd guess you don't have a UNIX tab because the Samba AD schema doesn't
have it. I'm not sure why that would be, since I don't use any of the
UNIX AD extensions myself."

I never have either, it always JUST WORKED. This is not frustration with
the help, it is frustration in that it just refuses to work for no good
reason. That's why I am attempting to ditch Windows, because things just
don't work and nobody knows why. I actually feel that Rowland and Steve
have been great, and have made me SERIOUSLY question the highly
incomplete guides on the wiki. I mean nowhere does it mention the line
that creates the keytab for Kerberos in any guides. Nowhere does it
mention the ID's or anything else they have talked with me about. I
honestly believe the ID numbers will solve the issue, but I cannot do
that yet.

"You do not need to provision with rfc2307 nor do you need a UNIX tab to
allocate uidNumbers. You already have what you need. Please try it."

Alright, how? Again, and this is what I keep repeating, I have NEVER had
to do this before. Up to this very point in time, S4 has been
rock-solid. None of my other domains use the Kerberos keytab. None of
them use uID's or gID's. They all just work. You're telling me I have
the tools to do this, but it is like me telling you to adjust your main
jet to 1.5 turns out. Unless you're into antiques like I am, you haven't
a clue what I mean or how to do it. I am not trying to be rude, I just
literally do not have a clue how to do this.

"You have to activate advanced features in ADUC and edit the attributes
from the attribute editor tab."

Yes, I did that and saw it in there, but chose not to edit that way for
one reason. According to many posts I read on search results from
Google, the UNIX tab shows up once the system detects NIS. I believe NIS
is off for some reason, but I did the check at the link below and it
returned one result, indicating that NIS is supposedly enabled. It would
be better to simply show me a yes or no, but I guess that isn't an option.

ldbsearch -H /var/lib/samba/private/sam.ldb -s base -b
CN=ypservers,CN=ypServ30,CN=RpcServices,CN=System,DC=truevine,DC=lan
Referenced from:
https://wiki.samba.org/index.php/Using_RFC2307_on_a_Samba_DC

Ricky:
I have NOT pulled any packages from any repos. I cloned the official
repo, configured and built. It turns out that by default it builds
4.2.0-pre<xyz> instead of 4-1-stable. In an attempt to rule out a 4.2
bug, I uninstalled (make uninstall) 4.2 and configured and built 4.1,
then installed it. I completely removed any leftover files and
directories by hand, with the exception of my configuration file. Here's
the info you requested.

root@fs01:~# getent passwd | grep reachfp
reachfp:*:70010:70002:reachfp:/home/TRUEVINE/reachfp:/bin/false
root@fs01:~# getent passwd | grep cynthiaj
cynthiaj:*:70016:70002:Cynthia Jones:/home/TRUEVINE/cynthiaj:/bin/false
root@fs01:~# getent passwd | grep daquanm
daquanm:*:70002:70002:DaQuan Major:/home/TRUEVINE/daquanm:/bin/false
root@fs01:~# getent passwd | grep reach_support
reach_support:*:70015:70002:Reach
Support:/home/TRUEVINE/reach_support:/bin/false

=====================
FS01 Configuration File:
=====================
[global]
netbios name = FS01
workgroup = TRUEVINE
security = ADS
realm = TRUEVINE.LAN
encrypt passwords = yes
dedicated keytab file = /etc/krb5.keytab
kerberos method = secrets and keytab

idmap config *:backend = tdb
idmap config *:range = 70001-80000
idmap config TRUEVINE:backend = ad
idmap config TRUEVINE:schema_mode = rfc2307
idmap config TRUEVINE:range = 500-40000
idmap_ldb:use rfc2307 = yes

winbind nss info = rfc2307
winbind trusted domains only = no
winbind use default domain = yes
winbind enum users = yes
winbind enum groups = yes

vfs objects = acl_xattr
map acl inherit = yes
store dos attributes = yes
auth methods = winbind
log level = 3

[install$]
path = /home/shared/install
comment = "Software installation files"
read only = no
guest ok = no

[staff$]
path = /home/shared/staff
comment = "Staff file share"
read only = no
guest ok = no

[fbc$]
path = /home/shared/fbc
comment = "Family Bible College file share"
read only = no
guest ok = no


One thing I am unclear on is whether or not I need "idmap_ldb:use
rfc2307 = yes" in member server configs or ONLY AD DC configs. Also,
what does "idmap config TRUEVINE:range = 500-40000" specify? I was
trying to set AD users to 70001-80000 for their ID's, but maybe I
misunderstand things. Thanks for your help and input. I'm not frustrated
with you guys, just the fact that ONE server is acting up and I am
having to do all kinds of things I have never had to do before just to
share files. It isn't a bad frustration however, I enjoy building
projects from source and using Linux in general. If this was Windows I'd
have found an alternative by now.

steve

unread,
Aug 6, 2014, 3:30:02 AM8/6/14
to
On Wed, 2014-08-06 at 00:24 -0400, Ryan Ashley wrote:
> Plenty of replies since this afternoon! I will try to answer your
> questions in order, as well as ask questions.
>
> "All provisioning with RFC2307 does is add the ypServ30.ldif, it does
> not do anything else, it is up to you to use it. "
>
> Alright, how? Remember, all my domains are golden except this. I have
> never had to use ldif files or assign ID numbers because they always
> just worked.
>
> "This is a known windows problem, search Google (other search providers
> are available) for a solution."
>
> I have been searching, and I have tried loads of results, to no avail.
> Some said install libnss-ldapd, which I still don't know what it does,
> others said to do various config entries, also to no avail, so I am back
> here. I have reverted my changes since nothing worked.
>
> "I'd guess you don't have a UNIX tab because the Samba AD schema doesn't
> have it. I'm not sure why that would be, since I don't use any of the
> UNIX AD extensions myself."
>
> I never have either, it always JUST WORKED. This is not frustration with
> the help, it is frustration in that it just refuses to work for no good
> reason. That's why I am attempting to ditch Windows, because things just
> don't work and nobody knows why. I actually feel that Rowland and Steve
> have been great, and have made me SERIOUSLY question the highly
> incomplete guides on the wiki.

Please remember that here, you're at the bleeding edge of open source.
It is up to you to help us get the documentation up to your own high
standard. One thing you can do immediately is to post your method for
getting your other domains working so well. A simple blog post is all
that is required. The people here soon find them. And hit them hard.
Here is one you could try:
http://goo.gl/TnXsaj

> I mean nowhere does it mention the line
> that creates the keytab for Kerberos in any guides. Nowhere does it
> mention the ID's or anything else they have talked with me about. I
> honestly believe the ID numbers will solve the issue, but I cannot do
> that yet.
>
> "You do not need to provision with rfc2307 nor do you need a UNIX tab to
> allocate uidNumbers. You already have what you need. Please try it."
>
> Alright, how?

Please try to help us to help you. We have already sent you the link to
try to hint as to how you could get information which tells you how to
do this:
http://bit.ly/1s8LTZc

This will get you there directly:
ldbedit --url=/path/to/your/samba/private/sam.ldb cn=Domain\ Users
add the line:
gidNumber: 20513

ldbedit --url=/path/to/your/samba/private/sam.ldb cn=reachfp
add the line:
uidNumber: 501

For this, you need to know how to use vi. If you are unwilling or unable
to do so, please tell us and we'll send an alternative method.
HTH,
Steve

Rowland Penny

unread,
Aug 6, 2014, 4:40:02 AM8/6/14
to
On 06/08/14 05:24, Ryan Ashley wrote:
> Plenty of replies since this afternoon! I will try to answer your
> questions in order, as well as ask questions.
>
> "All provisioning with RFC2307 does is add the ypServ30.ldif, it does
> not do anything else, it is up to you to use it. "
>
> Alright, how? Remember, all my domains are golden except this. I have
> never had to use ldif files or assign ID numbers because they always
> just worked.
>

By adding whatever RFC2307 attributes that you will need, these are
usually uidNumber, gidNumber, loginShell and unixHomeDirectory. How you
add them is up to you, you can use samba-tool, ADUC or even write your
own scripts around ldb-tools etc.

I think that in the past you must have been using the winbind rid
backend, only problem with this is that (at the moment) you get
different id numbers on the server from any client.

> "This is a known windows problem, search Google (other search
> providers are available) for a solution."
>
> I have been searching, and I have tried loads of results, to no avail.
> Some said install libnss-ldapd, which I still don't know what it does,
> others said to do various config entries, also to no avail, so I am
> back here. I have reverted my changes since nothing worked.

You cannot have searched very hard, the search term 'no unix attributes
tab' turns up about 1,910,000 results and the top one is:

http://support.microsoft.com/kb/921913

>
> "I'd guess you don't have a UNIX tab because the Samba AD schema
> doesn't have it. I'm not sure why that would be, since I don't use any
> of the UNIX AD extensions myself."

That was a very wrong statement, even if you do not provision with
rfc2307, you still get the rfc2307 attributes and objectclasses in AD
and it is not the reason you haven't got the tab

>
> I never have either, it always JUST WORKED. This is not frustration
> with the help, it is frustration in that it just refuses to work for
> no good reason. That's why I am attempting to ditch Windows, because
> things just don't work and nobody knows why. I actually feel that
> Rowland and Steve have been great, and have made me SERIOUSLY question
> the highly incomplete guides on the wiki. I mean nowhere does it
> mention the line that creates the keytab for Kerberos in any guides.
> Nowhere does it mention the ID's or anything else they have talked
> with me about. I honestly believe the ID numbers will solve the issue,
> but I cannot do that yet.
>
> "You do not need to provision with rfc2307 nor do you need a UNIX tab
> to allocate uidNumbers. You already have what you need. Please try it."
>
> Alright, how? Again, and this is what I keep repeating, I have NEVER
> had to do this before. Up to this very point in time, S4 has been
> rock-solid. None of my other domains use the Kerberos keytab. None of
> them use uID's or gID's. They all just work. You're telling me I have
> the tools to do this, but it is like me telling you to adjust your
> main jet to 1.5 turns out. Unless you're into antiques like I am, you
> haven't a clue what I mean or how to do it. I am not trying to be
> rude, I just literally do not have a clue how to do this.
>

er, I actually do know what you are talking about when it comes to the
main jet, this would be the initial setting on the carburettor and you
would adjust the high speed running from there, what do you set the slow
run jet to ?

Just how did you setup samba prior to having these problems, did you set
it up as a PDC or a standalone or what ?

You also seem very reticent about answering questions, you never seem to
quite answer them fully, sometimes not at all.
All of those numbers are coming from the 'builtin' range (70001-80000)
and shouldn't be and wouldn't be if you gave your users and groups
uidNumber's & gidNumber's

If you do not want to do this, change this line:

idmap config TRUEVINE:backend = ad

To this:

idmap config TRUEVINE:backend = rid

Remove these:

idmap config TRUEVINE:schema_mode = rfc2307
idmap_ldb:use rfc2307 = yes # this shouldn't be on the fileserver
anyway, it's for the AD server
auth methods = winbind

Rowland

steve

unread,
Aug 6, 2014, 4:50:03 AM8/6/14
to
On Wed, 2014-08-06 at 09:29 +0100, Rowland Penny wrote:
> adjust your
> > main jet to 1.5 turns out. Unless you're into antiques like I am, you
> > haven't a clue what I mean or how to do it. I am not trying to be
> > rude, I just literally do not have a clue how to do this.
> >
>
> er, I actually do know what you are talking about when it comes to the
> main jet, this would be the initial setting on the carburettor and you
> would adjust the high speed running from there, what do you set the slow
> run jet to ?

ROFL! That's only for Strombergs before part number AC12475682. For twin
SUs, you must use 2 full turns.

Oh, and don't forget 2 shots of loginShell per gallon.

Rowland Penny

unread,
Aug 6, 2014, 2:00:02 PM8/6/14
to
On 06/08/14 18:50, Ryan Ashley wrote:
> Sorry Rowland! I accidentally sent this to you the first go around. My
> bad.
>
> I am actually surprised that a few others in the IT field know how to
> toy with carbs and such. My hobby is antique tractors and road
> vehicles. I love how easy it is to work on them. I wouldn't touch my
> 2013 F-150 with a ten-foot pole though. Too many computers and such.
> Also, the engine is covered in plastic guards, but I digress.
>
> What information have I not answered fully? If I did not understand
> what was asked, I asked about it. Like when "ute" was posted. I have
> posted my configs each time they are asked for. Nothing has been
> edited. I asked about NIS and you gave me the link at MS I read a
> while back. It says install the NIS stuff. S4 says NIS is installed.
> Now I am confused. I very obviously cannot install NIS stuff from 2008
> R2 into a Linux system with S4, and S4 says it is running NIS
> according to the test on the wiki page I linked below. Do you
> understand my confusion now?
>
> To add to that, MS says that once the NIS stuff is on the server
> (again, S4 says it is), I will see the UNIX tab on my ADUC tool. This
> is why I have been very hesitant to use the advanced feature and
> attempt to add ID's. If the tool isn't detecting NIS and I force this
> stuff, will something break? If I can get a guarantee that nothing
> will break if I force ID's via the advanced options, I'll do it right
> now. My thought process is different however. It goes something like
> "I need to get NIS working on the S4 server, then the regular tab will
> show up, and I am golden. Since it is not showing up, I probably
> shouldn't attempt to force ID's through the advanced option". Am I
> wrong here?
>
> As for questions, I asked two or three times if I needed that line in
> my member server configurations, and I was just now told that I should
> only have it on DC's. This is fine, but we all miss or forget to
> answer once in a while, so if I forgot something, kindly remind me and
> I will be happy to answer it. Oh, and what about my question for the
> line that sets a range of 500-40000?
>
> I'm not aggravated with anybody, but I need this fixed. I am a VERY
> BUSY person and I may forget things. Do not take it personally,
> please. I love the S4 project and it has worked fine up until now. I
> believe my issue here is that I must assign an ID to each group and
> each user for file shares to work correctly under Linux. My other
> clients share files from Linux-based NAS devices and that is PROBABLY
> the key difference. Now I know I can add these ID numbers without the
> UNIX tab, but is it safe to do that
Too late, I already replied ;-)

Rowland

Ryan Ashley

unread,
Aug 6, 2014, 2:00:02 PM8/6/14
to

Rowland Penny

unread,
Aug 6, 2014, 2:00:01 PM8/6/14
to
On 06/08/14 18:33, Ryan Ashley wrote:
> I am actually surprised that a few others in the IT field know how to
> toy with carbs and such. My hobby is antique tractors and road
> vehicles. I love how easy it is to work on them. I wouldn't touch my
> 2013 F-150 with a ten-foot pole though. Too many computers and such.
> Also, the engine is covered in plastic guards, but I digress.

I didn't 'toy' with carbs, I was deadly serious for over 30 years, but
like you, I digress here.

>
> What information have I not answered fully? If I did not understand
> what was asked, I asked about it. Like when "ute" was posted. I have
> posted my configs each time they are asked for. Nothing has been
> edited. I asked about NIS and you gave me the link at MS I read a
> while back. It says install the NIS stuff. S4 says NIS is installed.
> Now I am confused. I very obviously cannot install NIS stuff from 2008
> R2 into a Linux system with S4, and S4 says it is running NIS
> according to the test on the wiki page I linked below. Do you
> understand my confusion now?

The only problem I have with all that, is the fact that I found myself
in the same position as you, I did not have the UNIX-Attributes tab in
ADUC. I searched the internet and found, amongst others, the link I
posted, this helped me to get the tab to appear.

>
> To add to that, MS says that once the NIS stuff is on the server
> (again, S4 says it is), I will see the UNIX tab on my ADUC tool.

As I said earlier, this is a know windows problem, note I say windows,
it has nothing to do with S4.

> This is why I have been very hesitant to use the advanced feature and
> attempt to add ID's. If the tool isn't detecting NIS and I force this
> stuff, will something break? If I can get a guarantee that nothing
> will break if I force ID's via the advanced options, I'll do it right
> now. My thought process is different however. It goes something like
> "I need to get NIS working on the S4 server, then the regular tab will
> show up, and I am golden. Since it is not showing up, I probably
> shouldn't attempt to force ID's through the advanced option". Am I
> wrong here?

You can very easily add RFC2307 attributes with ldb-tools, or by using
ldifs, the only problem doing it this way, is that you have to keep
records of what uidNumber's & gidNumber's you have used. You will not
damage anything by adding the attributes, provided you do it correctly.
Before you say 'well there you go again, telling me to do something
without telling me how' , decide which way you want to go and we will
try to help you get there.

>
>
> As for questions, I asked two or three times if I needed that line in
> my member server configurations, and I was just now told that I should
> only have it on DC's. This is fine, but we all miss or forget to
> answer once in a while, so if I forgot something, kindly remind me and
> I will be happy to answer it. Oh, and what about my question for the
> line that sets a range of 500-40000?

I must have missed that one, what was the question ?

>
> I'm not aggravated with anybody, but I need this fixed. I am a VERY
> BUSY person and I may forget things. Do not take it personally,
> please. I love the S4 project and it has worked fine up until now. I
> believe my issue here is that I must assign an ID to each group and
> each user for file shares to work correctly under Linux. My other
> clients share files from Linux-based NAS devices and that is PROBABLY
> the key difference. Now I know I can add these ID numbers without the
> UNIX tab, but is it safe to do that?
>

Ah, sharing from a NAS, they usually are running S3 and are not part of
a domain, these will be setup differently from an S4 AD DC.

Yes it is safe to add ID numbers without using ADUC.

Rowland
> On 08/06/2014 04:29 AM, Rowland Penny wrote:

Stuart Naylor

unread,
Aug 6, 2014, 2:10:01 PM8/6/14
to
Whoa there :)

Lol All I am pointing out is an experience. Its not so bad now as I know.

I am not sure about the reference to sernet as the binaries are free and sernet support is optional.

I just don't want the probs of any noob compile errors or battling with apparmor.

I mention sernet purely to say there are a lot of choices, depending on distro it can be sernet, backports or native.

Its a about choice and I thought I would just mention they are available.

Personally you shouldn't be so tender about someones experience with the documentation whilst only they are doing is making an honest evaluation of their experience.

I must admit I don't understand a mailing list as you must get so many replications of the same.

I think a forum is often a better platform.

Again this is no dictate just saying how my experience is and giving you some feed back

Please meddle away, it was purley an opinion.

The documentation is a bit sketchy and when you do a google because of the tremendous fast development its a bit of a mare because of the tremendous fast development

There are a lot of versions and sometimes its very easy to get confused.

Also because its so fast and a moving roadmap I don't even know if a standard static wiki is maybe the right form yet.

Dunno just opinion and feedback :)

Stuart



-----Original message-----
> From:Gregory Sloop <gr...@sloop.net>
> Sent: Tuesday 5th August 2014 19:46
> To: Ryan Ashley <ry...@reachtechfp.com>
> Cc: sa...@lists.samba.org
> Subject: Re: [Samba] Samba 4 AD share: Access denied
>
>
>
> RA> Well, again, no issues until now. I never did the Kerberos keytab thing
> RA> before, and everything works. Never did the NIS thing before, and
> RA> everything works. Now I am learning these things should be done and I
> RA> have been told what to do and have done them as well as documented them
> RA> in our technical reference. However, I am now at the point where I
> RA> cannot set ID's due to not having the UNIX tab in ADUC. I did provision
> RA> with "--use-rfc2307" and it is in all of my S4 configuration files, but
> RA> no luck yet. What do I need to check to get that tab to appear? If
> RA> assigning an ID fixes this, I will HAPPILY do it on all of our domains
> RA> as we go out for maintenance.
>
> RA> On 08/05/2014 02:16 PM, steve wrote:
> >> On Tue, 2014-08-05 at 13:17 -0400, Ryan Ashley wrote:
> >>> The way that sounds, the "file server" guide is incomplete, because
> >>> nowhere does it mention any of what you're telling me. I also have
> >>> little trouble finding good documentation on every Linux product I use.
> >>> S4 is the one big exception, but with the guides, it eliminates some of
> >>> that need. I do not buy the whole argument of using Windows for
> >>> documentation, because 90% of their documentation is rambling crud. When
> >>> you get an error and have an ID, the docs don't have the ID you want,
> >>> you are hosed.
> >> Unless you know what you're doing, the time it takes to get up on
> >> user-land Linux compared with enterprise or microsoft
> >> out-of-the-box-or-just-call-the-engineer is false economy.
> >>> Again, I am running Debian Wheezy 7.5 64bit under XenServer 6.2 with the
> >>> latest updates. The stable repos have an OLD version of S4, and I do not
> >>> mind building it myself anyway.
> >> Debian doesn't install samba unless you tell it?
> >>> Finally, you have told me I need this and that, but no direction is
> >>> noted.
> >> http://bit.ly/1s8LTZc
>
>
> I've followed this thread since it started - and while I don't have technical help to offer, since I've not followed the technical details carefully - I'd thought I'd say this, even at the risk of being seen to "meddle" where I shouldn't.
>
> I'll try to be gentle about it, but you've hopped all over the place. ...claimed that revereses in DNS didn't work, but then found you hadn't finished configuring DNS etc.
>
> Just SLOW DOWN! Yeah, the docs can be skimpy, and things can be a bit confusing - but SLOW DOWN - tackle one thing at a time. Don't make a thousand changes and keep moving the goal-posts all over the field.
>
> I know Rowland/Steve/Marc will almost certainly be able to resolve your issue. But it's going to take careful, methodical steps through each part. And, IMO, you haven't done that very well. Sometimes you'll answer a few of the underlying questions, and leave out others. [Not sure why, perhaps you missed them, but often it seems you're doing it because you're frustrated and want a solution right this second.]
>
> If I were helping you, I'd be quite frustrated at the effort. The guys helping you are the best on the list. Short of a Samba dev person hopping in to verify a particular bug, there's not better help to be had. So, no matter if it worked three weeks ago or not, if you want help, and it's not working, and you'd like for it to work - go gentle on the help you ARE getting. Being frustrated with them won't help.
>
> I suppose you could run a SerNet package and pay SerNet to solve your problems/do Samba consulting. But you're not paying anyone and they're spending a lot of time trying to help you...
>
> Please try to be gentle and appreciative...
>
> As an aside:
> I'd guess you don't have a UNIX tab because the Samba AD schema doesn't have it. I'm not sure why that would be, since I don't use any of the UNIX AD extensions myself.
>
>

Ryan Ashley

unread,
Aug 6, 2014, 2:30:02 PM8/6/14
to
Alright, I already gave every group a gIDNumber using the "advanced
features" option via the "Attribute Editor". Each group has a unique ID.
There are 16 built-in groups (domain admins, domain users, etc) and five
I have. My last group ended with 10021. The first group was 10001. I
then stopped S4 on my print-server, deleted "group_mapping.tdb",
"winbind_cache.tdb", and "winbind_idmap.tdb", rebooted the server, and
(S4 starts automatically) changed group ownership of a directory to
"domain admins". When listing the directory with "ls -lAn", it showed
70012, not 10001. So they all have gIDNumber set now, but it isn't
pulling through. What could cause that?

Rowland Penny

unread,
Aug 6, 2014, 2:40:02 PM8/6/14
to
On 06/08/14 19:20, Ryan Ashley wrote:
> Alright, I already gave every group a gIDNumber using the "advanced
> features" option via the "Attribute Editor". Each group has a unique
> ID. There are 16 built-in groups (domain admins, domain users, etc)
> and five I have. My last group ended with 10021. The first group was
> 10001. I then stopped S4 on my print-server, deleted
> "group_mapping.tdb", "winbind_cache.tdb", and "winbind_idmap.tdb",
> rebooted the server, and (S4 starts automatically) changed group
> ownership of a directory to "domain admins". When listing the
> directory with "ls -lAn", it showed 70012, not 10001. So they all have
> gIDNumber set now, but it isn't pulling through. What could cause that?

OK, can you post the results of these two commands (run on the S4 server):

ldbsearch --url=/usr/local/samba/private/sam.ldb sAMAccountName=<username>

ldbsearch --url=/usr/local/samba/private/sam.ldb cn=Domain\ Users

Replace <username> with a valid domain user, you may also have to change
the path to sam.ldb, you may also have to install ldb-tools, but as I
think that as you compiled samba yourself, they will be installed in
/usr/local/samba/bin

Rowland

Ryan Ashley

unread,
Aug 6, 2014, 3:20:02 PM8/6/14
to
Alright, here are the results. I gave the domain admin UID 10001, and it
shows up. I gave the domain users group a GID, and it shows also.

root@dc01:~# ldbsearch --url=/var/lib/samba/private/sam.ldb
sAMAccountName=reachfp
# record 1
dn: CN=reachfp,CN=Users,DC=truevine,DC=lan
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
description: Built-in account for administering the computer/domain
instanceType: 4
whenCreated: 20140619182759.0Z
uSNCreated: 3545
objectGUID: 95f14a06-9370-40ef-8587-546afd171bb6
userAccountControl: 512
badPwdCount: 0
codePage: 0
countryCode: 0
badPasswordTime: 0
lastLogoff: 0
lastLogon: 0
pwdLastSet: 130476760790000000
primaryGroupID: 513
objectSid: S-1-5-21-1282933182-1339137838-203774845-500
adminCount: 1
accountExpires: 9223372036854775807
logonCount: 0
sAMAccountType: 805306368
objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=truevine,DC=lan
isCriticalSystemObject: TRUE
memberOf: CN=Administrators,CN=Builtin,DC=truevine,DC=lan
memberOf: CN=Group Policy Creator Owners,CN=Users,DC=truevine,DC=lan
memberOf: CN=Enterprise Admins,CN=Users,DC=truevine,DC=lan
memberOf: CN=Schema Admins,CN=Users,DC=truevine,DC=lan
memberOf: CN=Domain Admins,CN=Users,DC=truevine,DC=lan
userPrincipalName: rea...@truevine.lan
givenName: Reach
sAMAccountName: reachfp
cn: reachfp
name: reachfp
sn: Technology FP
displayName: Reach Technology FP
uid: 10001
whenChanged: 20140806175855.0Z
uSNChanged: 114720
distinguishedName: CN=reachfp,CN=Users,DC=truevine,DC=lan

# Referral
ref: ldap://truevine.lan/CN=Configuration,DC=truevine,DC=lan

# Referral
ref: ldap://truevine.lan/DC=DomainDnsZones,DC=truevine,DC=lan

# Referral
ref: ldap://truevine.lan/DC=ForestDnsZones,DC=truevine,DC=lan

# returned 4 records
# 1 entries
# 3 referrals
root@dc01:~# ldbsearch --url=/var/lib/samba/private/sam.ldb cn=Domain\ Users
# record 1
dn: CN=Domain Users,CN=Users,DC=truevine,DC=lan
objectClass: top
objectClass: group
cn: Domain Users
description: All domain users
instanceType: 4
whenCreated: 20140619182759.0Z
uSNCreated: 3541
name: Domain Users
objectGUID: 84560291-87be-4664-8a4d-08f44a84accf
objectSid: S-1-5-21-1282933182-1339137838-203774845-513
sAMAccountName: Domain Users
sAMAccountType: 268435456
groupType: -2147483646
objectCategory: CN=Group,CN=Schema,CN=Configuration,DC=truevine,DC=lan
isCriticalSystemObject: TRUE
memberOf: CN=Users,CN=Builtin,DC=truevine,DC=lan
gidNumber: 10003
whenChanged: 20140806180212.0Z
uSNChanged: 114735
distinguishedName: CN=Domain Users,CN=Users,DC=truevine,DC=lan

# Referral
ref: ldap://truevine.lan/CN=Configuration,DC=truevine,DC=lan

# Referral
ref: ldap://truevine.lan/DC=DomainDnsZones,DC=truevine,DC=lan

# Referral
ref: ldap://truevine.lan/DC=ForestDnsZones,DC=truevine,DC=lan

# returned 4 records
# 1 entries
# 3 referrals

Once I have the groups working, I'll be handing out a unique UID to each
user account, starting with the built-in ones.

Rowland Penny

unread,
Aug 6, 2014, 3:50:02 PM8/6/14
to
OK, I would suggest that you rename reachfp back to Administrator and
the attribute for the users ID is uidNumber not uid, do not give
Administrator a uidNumber, please remove the 'uid'. If you want a user
named reachfp, create a new one.

steve

unread,
Aug 6, 2014, 4:00:02 PM8/6/14
to
On Wed, 2014-08-06 at 13:50 -0400, Ryan Ashley wrote:

>
> What information have I not answered fully?

Most of the suggestions and tips we have given. As an example, you said
that you wanted to add IDs to your users. You were sent a link to help
you look up what you said you, 'had no idea how'. You ignored that, so
we sent you concrete examples to try. Still nothing.

You are a, 'VERY BUSY person', are you? Well, I can only urge everyone
here to jump on your case. I repeat. With a 2012 R2 licence and 90 days
reduced rate licence, you would have been up days ago for this side of
$3000

Cheers, and EOT from us,
Steve

Harry Jede

unread,
Aug 6, 2014, 4:50:02 PM8/6/14
to
On 21:52:01 wrote Ryan Ashley:
> Alright, I already gave every group a gIDNumber using the "advanced
> features" option via the "Attribute Editor". Each group has a unique
> ID. There are 16 built-in groups (domain admins, domain users, etc)
> and five I have. My last group ended with 10021. The first group was
> 10001. I then stopped S4 on my print-server, deleted
> "group_mapping.tdb", "winbind_cache.tdb", and "winbind_idmap.tdb",
> rebooted the server, and (S4 starts automatically) changed group
> ownership of a directory to "domain admins". When listing the
> directory with "ls -lAn", it showed 70012, not 10001. So they all
> have gIDNumber set now, but it isn't pulling through. What could
> cause that?

maybe you have xidnumbers and (u)(g)idnumbers ?

run this on your DC
# ldbsearch --url=/usr/local/samba/private/idmap.ldb 'xidnumber=70012'
objectSid

then search for this sid in sam.ldb
# ldbsearch --url=/usr/local/samba/private/sam.ldb objectsid=<returned
sid> objectSid uinumber gidnumber

in my installation


# ldbsearch --url=/var/lib/samba/private/idmap.ldb xidnumber=3000018
objectSid
# record 1
dn: CN=S-1-5-21-2523711511-101154222-1399562269-1104
objectSid: S-1-5-21-2523711511-101154222-1399562269-1104

# ldbsearch --url=/var/lib/samba/private/sam.ldb
objectsid=S-1-5-21-2523711511-101154222-1399562269-1104 objectSid
uinumber gidnumber
# record 1
dn: CN=user1,CN=Users,DC=ad,DC=schule,DC=lan
objectSid: S-1-5-21-2523711511-101154222-1399562269-1104
gidNumber: 50000




--

regards
Harry Jede

Ryan Ashley

unread,
Aug 6, 2014, 5:30:02 PM8/6/14
to
Thanks, Harry. I tried that on my DC and it turned up nothing, as you
can see below.

root@dc01:~# ldbsearch --url=/var/lib/samba/private/idmap.ldb
xidnumber=70012
# returned 0 records
# 0 entries
# 0 referrals
root@dc01:~# ldbsearch --url=/var/lib/samba/private/idmap.ldb
'xidnumber=70012'
# returned 0 records
# 0 entries
# 0 referrals

I tried with and without apostrophes around it.

As for the other comment, are you saying I need to set a field called
"gidNumber", not "gid"?

Ryan Ashley

unread,
Aug 6, 2014, 5:30:02 PM8/6/14
to
I have tried your suggestions, and some I had found prior to falling
back on the mailing list so I already knew some would not work. I was
not asked for a response after being pointed to the material so I did
not provide one.

Yes, I am very busy as I work as the lead IT and IS specialist in a
small business. I cannot devote weeks to a single problem as I handle
dozens a day, many resolved within 24hrs. This issue has been on-going
due to the fact that I have already tried a ton of what is out there,
and as for your "Google search", dozens of those are the same posts
regurgitated on numerous sites. I went through an entire page a week or
so back and every single link on the page was to the exact same post, on
numerous sits that have board-readers that simply read the samba lists
among others and duplicate the posts. Useless! I'd say out of 1.9mil
results, about 500k are unique. I am getting to where I dislike Google
for this reason, but that is another discussion.

I am also happy to hear that you can afford to blow thousands on a
simple DVD. Low-income businesses, churches, and what-not cannot. Yes,
we know of open-licensing and manage it for several clients, but many
people are not willing to spend anything right now if there is a viable
alternative. Seeing that S4 has worked flawlessly for two years at a few
locations, this fit the client's needs and we installed it. Something is
just different this time. I am learning a lot and intend to apply things
like the group and user ID's to other domains once we have it working
here to avoid future problems.

Also, Windows has MUCH higher resource requirements than Linux. On top
of that $3k, how much would we have to pay to bring up the hardware? Too
expensive for such little gain.

Finally, if you have taken some personal offense to something, speak up.
You offered assistance, I took what I had not already tried and tried
it. You did not ask for results, so I assumed the fact that I was still
asking for help would have been a clue that the suggestion was no good.
Every time anybody asked for anything, including configuration files, I
posted them, so there's no need to be bitter. Simply point out that I
may have missed something and I'll try it or let you know I already did.

Rowland Penny

unread,
Aug 7, 2014, 5:20:01 AM8/7/14
to
Active Directory works differently from Linux, it uses SID's and RID's,
Linux uses UID's and GID's. To use AD users as Linux users you somehow
have to convert the SID's and RID's to UID's and GID's. There are
several ways to do this by using programs like winbind, nslcd or sssd,
but they all boil down to the same two ways, you either create a UID/GID
from the RID or you give the user/group a uidNumber/gidNumber.

That is:
A user is given a uidNumber and gidNumber
A group is given a gidNumber

uidNumber and gidNumber are the attribute names, not uid or gid or
anything else.

The only way (at the moment) to ensure that your users/groups get the
same ID everywhere in the domain is to use RFC2307 attributes.

see here for info on RFC2307:

https://www.ietf.org/rfc/rfc2307.txt

How you add these RFC2307 attributes is up to you, the easiest way is to
use ADUC, but you say that you do not have the UNIX-Attributes tab on
your users and groups, I also had this problem and solved it by
searching the internet. I posted a link to one of the pages I used, so I
do not propose to go over old ground yet again.

If you cannot get the ADUC tab to work for you, then you can always use
ldb-tools to add the attributes, either by using ldbedit and directly
modifying the user/group or by creating an ldif and using ldbmodify to
add this. A typical ldif for a user called John Doe created on a windows
machine would be:

dn: CN=John Doe,CN=Users,DC=example,DC=com
changetype: modify
add: uid
uid: john
-
add: msSFU30Name
msSFU30Name: john
-
add: msSFU30NisDomain
msSFU30NisDomain: example
-
add: uidNumber
uidNumber: 10000
-
add: gidNumber
gidNumber: 10000
-
add: loginShell
loginShell: /bin/bash
-
add: unixHomeDirectory
unixHomeDirectory: /home/john
-
add: unixUserPassword
unixUserPassword: ABCD!efgh12345$67890

The above ldif is exactly the way that ADUC does it
(ABCD!efgh12345$67890 is the unixUserPassword that ADUC gives every unix
user), but you only really need the uidNumber & gidNumber. the uidNumber
needs to be a unique number and the gidNumber will be the users primary
Unix group (usually Domain Users) so that number needs to be what ever
you gave to your main Unix group i.e. Domain Users needs to have the
gidNumber '10000'

You would add the above ldif like this:

root@dc1:~# kinit
Password for admini...@EXAMPLE.COM:
root@dc1:~# ldbmodify --url=ldap://dc1.example.com --kerberos=yes
--krb5-ccache=/tmp/krb5cc_0" /path_to/ldif

Replacing 'dc1.example.com' with your S4 AD DC FQDN and '/path_to/ldif'
with the full path and name of your ldif, and of course you need to run
all of this on the S4 AD DC.

the uidNumber and gidNumber ranges can be identical, in fact this is the
way that ADUC works, but whatever range you do use, must be reflected in
smb.conf
i.e. 'idmap config EXAMPLE : range = 10000-999999'.

Just why you renamed the Administrator account, before you got
everything working, escapes me, in fact most people probably never
bother, so I would suggest that you rename the account back again, at
least until you get everything working correctly.

Do not give the Administrator account a uidNumber or gidNumber, create a
new user and give this new user the required RFC2307 attributes.

Once you have added the gidNumber to Domain Users and added the ldif to
John Doe, running (on a client joined to the domain) 'getent passwd'
should show a line for John Doe and 'getent group Domain\ Users' should
show the info for Domain Users.

This will be my last post on this thread.

Rowland

Ryan Ashley

unread,
Aug 7, 2014, 9:50:02 AM8/7/14
to
Thanks, Rowland. I just got in this morning and think it finally all
fell into place. You mentioned an LDIF file in a prior email. I assume
that if I import that LDIF file, it creates the attributes I need. After
that, I should be able to set them as you stated. Is this correct?

My current plan is to re-read your emails and find the file you
mentioned. If it does indeed add those attributes, I will import it and
try setting them as you stated. If it works, I will report success and
summarize what this entire thread was about for others to learn from
without reading it all.

Ryan Ashley

unread,
Aug 7, 2014, 10:30:03 AM8/7/14
to
Alright, new problem. That ypServ30.ldif file is asking for all kinds of
information I do not know or know how to get. I am ASSUMING the "domain
dn" it is asking for is "dc=truevine,dc=lan". However, it also needs to
know a NISDOMAIN variable and that I do not have a clue about. Is there
a guide dedicated just to editing this file? I don't have a NIS domain
to my knowledge. I just want to import the file so I can set my
attributes. This is kind of complicated just to add a few (four?)
attributes to my schema.

So, what do I set all these things in the LDIF file to? Is there a way I
can look them up?

Ryan Ashley

unread,
Aug 7, 2014, 11:30:01 AM8/7/14
to
I figured it out, but it won't let me import it.

root@dc01:~# ldbmodify -H /var/lib/samba/private/sam.ldb
/root/ypServ30.ldif --option="dsdb:schema update allowed"=true
ERR: (Entry already exists) "Entry
CN=ypServ30,CN=RpcServices,CN=System,DC=truevine,DC=lan already exists"
on DN CN=ypServ30,CN=RpcServices,CN=System,dc=truevine,dc=lan at block
before line 5
Modify failed after processing 0 records
root@dc01:~#

So this means it is already there, right? If so, what must I do here? I
am going to check, but I do not remember seeing an attribute called
"gidNumber", only "gid".

Ryan Ashley

unread,
Aug 7, 2014, 2:30:03 PM8/7/14
to
Alright, I also checked and I was right, I set "uidNumber" and
"gidNumber". Pictures are attached. So with these set, why are they not
pulling across to my member servers?

I do have screenshots showing the correct attributes set in ADUC, but
they're note pulling across to my member servers.

Ryan Ashley

unread,
Aug 8, 2014, 9:20:02 AM8/8/14
to
I am still stuck here. Both member servers are ignoring the gidNumber
and uidNumber attributes and are assigning their own numbers and I
cannot figure out why. Leaving the domain, uninstalling S4, building the
latest, and reinstalling does not fix the issue.

Ryan Ashley

unread,
Aug 8, 2014, 9:50:01 AM8/8/14
to
Alright, I believe I figured something out, but may be mistaken. Again,
I don't see anything in plain English explaining, so this is my guess.
Please let me know if I am right.

[global]
netbios name = FS01
workgroup = TRUEVINE
security = ADS
realm = TRUEVINE.LAN
encrypt passwords = yes
dedicated keytab file = /etc/krb5.keytab
kerberos method = secrets and keytab

idmap config *:backend = tdb
idmap config *:range = 70001-80000
idmap config TRUEVINE:backend = ad
idmap config TRUEVINE:schema_mode = rfc2307
idmap config TRUEVINE:range = 10001-40000

winbind nss info = rfc2307
winbind trusted domains only = no
winbind use default domain = yes
winbind enum users = yes
winbind enum groups = yes

vfs objects = acl_xattr
map acl inherit = yes
store dos attributes = yes
auth methods = winbind

The line "idmap config *:range = 70001-80000" assigns a unique ID to
anybody who is not in the Truevine domain or who does not have a
uidNumber/gidNumber attribute set. Is this correct? This is where all of
my users and groups are getting ID's from.

Now, the line "idmap config TRUEVINE:range = 10001-40000" is the range
of uidNumber/gidNumber attributes to search. This is the range set aside
for domain users and groups, so I assume if I set this to something over
100k, it would never find anything. However, it is not finding the
uidNumber/gidNumber attributes in this range (which is everybody) for
some reason, and the users wind up with 70001 and above for their ID's.
So what am I doing wrong?

Rowland Penny

unread,
Aug 8, 2014, 10:30:01 AM8/8/14
to
I know I said that I wouldn't post on this thread again, but you are
doing my head in, you have taken a simple task and turned it into a farce!!!

I advised you at least once to remove this line:

auth methods = winbind

Here is why (taken from 'man smb.conf')

auth methods (G)

This option allows the administrator to chose what
authentication
methods smbd will use when authenticating a user. This option
defaults to sensible values based on security. This should be
considered a developer option and used only in rare
circumstances.
In the majority (if not all) of production servers, the default
setting should be adequate.

Default: auth methods =

This is also from 'man smb.conf' (abridged):

idmap config:OPTION (G)

ID mapping in Samba is the mapping between Windows SIDs and Unix
user and group IDs. This is performed by Winbindd with a
configurable plugin interface. Samba's ID mapping is
configured by
options starting with the idmap config prefix. An idmap option
consists of the idmap config prefix, followed by a domain
name or
the asterisk character (*), a colon, and the name of an idmap
setting for the chosen domain.

The following example illustrates how to configure the
idmap_ad(8)
backend for the CORP domain and the idmap_tdb(8) backend for all
other domains. This configuration assumes that the admin of CORP
assigns unix ids below 1000000 via the SFU extensions, and
winbind
is supposed to use the next million entries for its own mappings
from trusted domains and for local groups for example.

idmap config * : backend = tdb
idmap config * : range = 1000000-1999999

idmap config CORP : backend = ad
idmap config CORP : range = 1000-999999

YOURS:

idmap config *:backend = tdb
idmap config *:range = 70001-80000
idmap config TRUEVINE:backend = ad
idmap config TRUEVINE:schema_mode = rfc2307
idmap config TRUEVINE:range = 10001-40000

What the above means is that trusted domains and local groups will get
mapped to numbers between 70001 and 80000, local groups etc being the
windows builtin ones not UNIX ones.

Your AD users will ONLY get pulled from AD if the
uidNumber's/gidNumber's are between 10001 and 40000, ARE THEY ????

Have you actually got any normal users with uidNumber's & gidNumber's,
the last time I heard, you were trying to use the renamed Administrator
account as a normal account.

I would suggest that you go and take a running jump into Glenville Lake
to cool off, then come back and re-read your posts again, you might then
realise just what a Prat you are coming over as.

This is definitely my last post on this thread
It is loading more messages.
0 new messages