Gabriel D. Preston
2003-Feb-24 14:27 UTC
[Samba] logon script to adjust time on workstation
Hey everyone, I have what I think is a fairly simple question. In the logon script for users, I have it set to map some drives and set the time on the user's workstation, all Win2K machines. Now, shy of putting everyone in the Administrator's group, how can I have it set the time on that machine? It only successfully works when myself or the other administrator log on to a machine since we have Administrative privileges, but for everyone else, it says they don't have enough privileges and doesn't do it. Anybody have any suggestions? Below is our logon script: @echo off NET TIME \\SGI-FILE /SET /YES NET USE I: \\SGI-FILE\Install /YES NET USE F: \\SGI-FILE\Data /YES IF NOT "%OS%"=="Windows_NT" goto endit NET START "Automatic Updates" :endit -Gabriel Preston
You'd have to set the policy for the "Everyone" group to change the time on the workstation. I don't remember exactly where it is in Win2k, but I know it was possible in NT. Khanh Tran Network Operations Sarah Lawrence College -----Original Message----- From: Gabriel D. Preston [mailto:gpreston@sgillc.com] Sent: Monday, February 24, 2003 9:28 AM To: samba@lists.samba.org Subject: [Samba] logon script to adjust time on workstation Hey everyone, I have what I think is a fairly simple question. In the logon script for users, I have it set to map some drives and set the time on the user's workstation, all Win2K machines. Now, shy of putting everyone in the Administrator's group, how can I have it set the time on that machine? It only successfully works when myself or the other administrator log on to a machine since we have Administrative privileges, but for everyone else, it says they don't have enough privileges and doesn't do it. Anybody have any suggestions? Below is our logon script: @echo off NET TIME \\SGI-FILE /SET /YES NET USE I: \\SGI-FILE\Install /YES NET USE F: \\SGI-FILE\Data /YES IF NOT "%OS%"=="Windows_NT" goto endit NET START "Automatic Updates" :endit -Gabriel Preston -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Martin Thomas
2003-Feb-25 16:43 UTC
[Samba] Re: logon script to adjust time on workstation
>Okay, I just found it. For future reference, Go to: Start->Run->gpedit.msc > >Once the Group Policy editor opens, find: > >Computer Configuration -> Windows Settings -> Security Settings -> Local >Policies -> User Rights Assignments > >Then select the Policy "Change the System Time" and add Everyone to the >list. > >Thanks for the help Khanh. > >-Gabriel > >Khanh Tran wrote: > >>You'd have to set the policy for the "Everyone" group to change the time on >>the workstation. I don't remember exactly where it is in Win2k, but I know >>it was possible in NT. >> >>Khanh Tran >>Network Operations >>Sarah Lawrence College >>You might also use the Windows-Time-Service. So you don't need to give "Everyone" the right to change the time. - Install, config and start an ntpd on a server (e.g. your Samba-Server) - login to the Workstation as Admin and set the "Windows-Time-Service" to start "automatic" (Control-Panel-Configuration-Services) - go to the windows-command-line and type: net time /setsntp: <ip of time-server> With this setting you don't have to sync the time in the login-script, it's done by the Windows-Service. Martin