[Samba] login scripts do not run

John H Terpstra jht at samba.org
Thu Sep 23 03:24:55 GMT 2004


Folks,

If you want to execute a batch or command file that will update the windows 
client clock you need to note that only Administrator has the right 
(privilege) to update the system clock. This means that you need to update 
user rights and privileges so that "Everyone" or "Domain Users" can update 
the clock. This is NOT a samba problem - it is a Windows security settings 
issue.

Log onto your Windows XP Pro system. Open up:
Start->Control Panel->Administrative Tools->Local Security Settings

In the left panel:
Local Policies->User Rights Assignment

In the right panel:
Change the system time

Give the appropriate users or groups the right to change the system time.

Reboot the Windows XP Pro machine.

Now when you log on the time will update as the logon script executes.

This stuff is so simple! :)

- John T.

On Wednesday 22 September 2004 20:59, Raymond Lillard wrote:
> sfjoe at spamcop.net wrote:
> > I have a simple script that sets the time on a Windows client at
> > startup.
> > The one-line script:
> > net time \\myhost /set /yes
> > Works perfectly well when I double-click it from Windows Explorer, so I
> > don't think the problem lies there.
> >
> > The relevant lines in my smb.conf file:
> >
> > [global]
> > time server = yes
> > logon script = smbtimeset.BAT
> >
> > [netlogon]
> >    comment = shared scripts
> >    path = /usr/share/samba/scripts
> >    public = no
> >    writable = no
> >    browseable = no
> >
> >
> >
> > I've set the log level to '3' and there aren't any messages at all
> > relating to running a startup script.
> >
> > Any ideas?
>
> Well, yes I do.
>
> I was looking into this earlier today.
>
> You don't say enough about your workgroup/domain, but I
> have this problem too.  In my case, I am running v3.0.6
> as a PDC.  All of my MS clients are NT4-SP6 or better
> (well newer anyway).  Most are WinXP.
>
> What I find in the event log of WinXP clients is a message
> to the effect that the client has joined a NT4 domain
> (in this case, my Samba PDC) and the MS NT4 generation
> domain server does not support NTP.
>
> A bit of searching has found this:
>
> http://groups.google.com/groups?q=ntpclient+nt4-domain&hl=en&lr=&ie=UTF-8&c
>2coff=1&selm=%23Oa8EadWCHA.3360%40tkmsftngp11&rnum=1
>
> This article contains two links at the bottom
> which look promising too.
>
> I'm about to start playing with it, but I would be
> good to hear a Samba solution.  I don't like
> hacking the registry.
>
> Ray

-- 
John H Terpstra
Samba-Team Member
Phone: +1 (650) 580-8668

Author:
The Official Samba-3 HOWTO & Reference Guide, ISBN: 0131453556
Samba-3 by Example, ISBN: 0131472216
Hardening Linux, ISBN: 0072254971
OpenLDAP by Example, ISBN: 0131488732
Other books in production.


More information about the samba mailing list