***SPAM*** [Samba] LDAP logonHours problem

Peter Eser Peter.Eser at heuft.com
Tue Nov 27 07:13:43 GMT 2007

time ago I fiddled alot with sambaLogonHours. The 2 main problems I can
rethink of where

the Sunday are the first 6 FFFFFF, but the first hour is the most RIGHT bit
of this FFFFFF

sambaLogonHours is in UTC so you have to calc with your timezone (and that
is weired with
daylight saving times, because I believe the bits must be shuffled when
daylight saving time changes)

This was all try and error, did not found a documentation wich was precise
enough. No warranties.

----- Original Message -----
From: "Peter Molnar" <molnarp.pub at gmail.com>
To: <samba at lists.samba.org>
Sent: Tuesday, November 27, 2007 12:18 AM
Subject: ***SPAM*** [Samba] LDAP logonHours problem

> Hi!
> I have a problem according to the logonHours setting in my Samba Domain.
> Users are in LDAP, and everyone has a logonHours attribute, which could
> - login is possible at any time
> - login is only possible between 7AM and 12PM(mindnight), 7h-24h in 24
> hours format, I'm going to use 24h format here in this post.
> Samba manual states than logonHours is a 168 bit mask, starting with
> Sunday 0h-1h, each bit represents an hour of the week, converted into
> Hex.
> Therefore:
> For 'any time' login, I'm using
> have this in logonHours, can log in at any time.
> For logins limited to 7h-24h, I'm using:
> Here comes the problem, the limited users cannot log in before 10h,
> they get the error "out of login time". Samba log says the same, and
> the timestamp there is correct.
> Saturday in the morning, i've tried setting different logonHours
> attributes on my own account, to see which one shold be 1 to let me
> log in at that time (between 7h and 8h)
> Surprisingly, I got this: "000000000000000000000000000000000000400000"
> Well, it's 6 hours earier than I expected, but OK, let's try this
> It worked in the morning but in the afternoon, it didn't.
> What could be the problem? My calculations are bad, or timezone
> problem (Hungary, central european time, UTC+1)? Can anyone please
> send me a working logonHours string, or calculate the correct string
> for logins 7h-24h.
> Until we figure out what's wrong, can I override the LDAP logonHours
> attributes from smb.conf, to allow everyone to log in, at any time?
> Regards,
> Peter
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/listinfo/samba

More information about the samba mailing list