NTP time sync. How to automatically sync to my example server and not time.windows.com - ntp

I'm syncing my time to an NTP server (call it ntpbox)
I ran the following commands which does sync successfully the time to ntpbox
w32tm /config /manualpeerlist:ntpbox /syncfromflags:manual /reliable:yes /update
w32tm /resync
However, even after I run this command, the automatic time sync is still set to time.windows.com
I do not get ntpbox in the dropdown when I click on Change Settings
Is there any command that helps in making ntpbox as an automatic one and not time.windows.com
I know the time servers populate from registry path:
I do not want to add ntpbox as ID 3 and make default flag to 3 manually (which works)
I need you guys to help me see if there is any w32tm cmd that can set ntpbox as automatic sync server

Related

Azure Active Directory Server 2016 Group Policy Startup Applications (Chrome) not loading on client workstations

Hi I'm trying to implement a Group Policy in our domain that forces Google Chrome to be added to client startup applications. I've added a GPO and added the key:
Computer Configuration > Administrative Templates > System > Logon > Run These Programs at User Logon
In the "Items to run at logon" I've added the path to chrome.exe (with quotes) like so:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
I've then linked to the Object in our Domain's User and Computer OUs.
I've also pushed the update out to clients and confirmed they have updated GP.
However Chrome does not start when users boot into their laptops.
I'm hoping someone can shine a light on what I've done wrong/what I've forgotten to do - any help much appreciated!
Summarize the comment link as a reply to close this issue.
Per duenni1's comment it looks like the most successful way people are reporting is to use the startup folder instead of the logon group policy. "In my opinion the correct solution: use GPP to manage shortcuts in startup menu folder. Simply create a startup shortcuts."
Could throw it in this directory:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
This will launch the program when they login, we do this to force users into our IM client
https://community.spiceworks.com/topic/1369848-run-these-programs-at-user-logon
If you really want this method to work, I'd start troubleshooting here:
1) is there already a GPO in place that will perform Run These Programs at user logon? That may be the winning GPO
GPO Run these programs at user logon not taking effect
2) According to the official docs, no error is a path issue ( I think your usage of quotes is correct but out of curiosity I'd be curious if removing the quotes has a change).
NOTE: If the program does not run, make sure the path is correct. The program does not run (and no error message is displayed) if the path is not found.

Use XDebug on a multi-user environment

I'm developing on a shared local server with some other people. This server has one Apache/PHP instance, but then it has multiple "sites-available" (VirtualHost) for different people.
I would like to get XDebug working so every one of us can use it independently. The problem is that if we enable XDebug and, for example, my IDE is connected to the server and I set a breakpoint, it'll stop if other person is browsing the page, even if it's in his/her own VirtualHost.
Any hints on how to properly set this up?
Edit:
Forgot to mention that the webserver is running in Docker.
This is the current configuration of XDebug:
# automatically start debugger on every request
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_port=9000
# send all debug requests to 127.0.0.1
xdebug.remote_connect_back=0
xdebug.remote_host=host.docker.internal
#log all xdebug requests to see is it working correctly
xdebug.remote_log=/var/log/debug.log
Thanks.
This should not happen at all, unless you have xdebug.remote_autostart turned on, and have hard coded xdebug.remote_host (instead of using xdebug.remote_connect_back). You don't want to hard code xdebug.remote_host in a multi-user environment really.
Debugging sessions are only initialised when the XDEBUG_SESSION_START is detected (which is what the browser extension will set, or when that is added to the GET/POST parameters)--and continued requests.
There is also no such concept as:
my IDE is connected to the server
Upon every request, Xdebug (if set to trigger with the cookie) will connect to the IDE. And it uses the xdebug.remote_host setting, or the inferred IP address if xdebug.remote_connect_back is enabled to connect to. And the end of the request, that connection is severed. You can use xdebug.remote_log=/tmp/xdebug.log to create a log file, which will indicate when connections are being made, and whether they work.

PostgreSQL settings

I want to turn the standard_conforming_strings off in postgresql.
I enter the command "set standard_conforming_strings=off;" and then check it with "show standard_conforming_strings;" and everything is ok. When I quit and then open the client again the setting is switched back to on.
How can I permanently turn it off ?
Settings in Postgresql can be made on three levels:
As you have already discovered, you can change individual settings on a session basis using set.
You can set parameters persistently on a per-user basis using the ALTER ROLE command. This can be set for a single database or for all databases in the server.
To change settings on a global basis, persistently for all users, you can edit postgresql.conf. Later versions of postgresql also allow changing global config via the ALTER SYSTEM command. In addition, global configuration overrides can be made by adding command line options when starting the server.
Not all parameters can be changed per session or per user.
Changes to postgresql.conf will not take effect until you reload the server (pg_ctl reload, or via appropriate system init command). Some parameters require a complete restart to take effect.
This manual page describes the different methods in more detail.
In postgresql.conf you set
standard_conforming_strings=off
and load new conf with
pg_ctl reload
as in docs: http://www.postgresql.org/docs/9.2/static/config-setting.html

Getting server logout when running long batch jobs in Seam

One of the requirements I have is to generate flat files in a specific format. The user selects the year from the UI and clicks the generate button.
The flat files process usually takes 3 to 4 hours to generate all the files. When the process is running and flat files are being created, the UI shows a modal that the job is being processed.
The problem is that after the files are successfully generated, the UI redirects to the login screen. Instead I want to refresh the UI showing the message that the process has successfully completed.
I am looking for help on this. Also would increasing the conversation timeout or session timeout in web.xml help fix this issue?
yes you could increase both session timeout and conversation timeout (if doing work in conversation scope) so they exceed the duration of the job
a better solution may be to store information on the jobs in a higher scope (eg. application or to the database), then if the user accidently logs out the job will continue running and complete

Scheduled Task to kill specific internet explorer tab

Is it possible to schedule a task that will kill a specific internet tab every 15 minutes?
Our operatives all access a reports dashboard, but due to the number of licenses we keep finding ourselves being unable to log on as people leave their screen open despite not using it.
If there was a scheduled task that ran every 15 minutes, perhaps that just kicked off a batch file that looked for an internet tab that's always called 'Dashboard' then it would kill it, that would be great.
Can anyone help please?
Thanks
I don't think this can be done easily if it can be done at all.
Does the application you use - Dashboard? - have a setting to handle a session after some time of inactivity as being closed like when closing the page in the browser or terminate the browser?
It would be better to control the session and license management from server side instead of from client side.
Do you use OpenStack Dashboard (Horizon) as I found the page Horizon does not implement a browser session timeout with the information that there is now such a feature.

Resources