Synchronize Linux System clock to Windows NTP Service - linux

I have a linux PC acting as a clock client and I would like to synchronize this PC's time using ntpdate against a Windows PC in the same space on the same network. I'm having trouble finding how to do this.
It isn't as easy as just calling ntpdate and using the IP address of the windows PC it would seem although I thought that the Windows Time service was an NTP server. You can see the results of that effort below:
signageclient#signagePC:~$ sudo ntpdate -u 192.168.1.100
1 Apr 09:49:03 ntpdate[12698]: no server suitable for synchronization found
Can anyone suggest how I would do this synchronization? Perhaps the proper windows service hasn't been started? In the above axample, this command is being run on the client PC (linux) and 192.168.1.100 is the IP if the windows PC. No firewall is on currently.

Found the answer! I needed to enable Windows NTP Server in the Local Group Policy Editor under Computer Configuration -> Administrative Templates -> System -> Windows Time Service -> Time Providers. After I enabled this I was able to synchronize against the PCs clock:
signageclient#signagePC:~$ sudo ntpdate -u 192.168.1.100 1 Apr
09:57:08 ntpdate[13347]: adjust time server 192.168.1.100 offset
-0.031445 sec
(This is all in Windows 7 by the way)

Related

Linux Opensuse Network Manager service is not running - OPENSSL_1_1_1d not found

I installed updates on my HP Opensuse Laptop and I cannot get wifi to connect anymore. The Wifi menu in the system tray is missing. I can see bluetooth, but not wifi. Upon investigation, Network Manager service is not running. When I try to run Networkmanager service from terminal using command NetworkManager --no-daemon, it comes up with the below error message.
NetworkManager: /lib64/libcrypto.so.1.1: version 'OPENSSL_1_1_1d' not found (required by /usr/lib64/libssh.so.4)
I have done some research and tried the following things.
Disable NetworkManager and Enable wicked service, but still the interfaces are complaining about NM not working.
When I check hwinfo, I can see the correct model and drivers for the wlan adapter.
I enabled the disabled adapters using ifup wlo1 as the interface was down when I checked ip addr
I was able to use iwlist wlo1 scan, I can see the networks in range, so the adapter is fine. It is an intel
I checked for bugs and there are some reports of similar behavior in 2019.
Use nmcli, it comes up with a message that "network manager is not running"
Tried to use YasT to disable NM and enable Wicked, but YasT does not bring up the Network screen any more after the update. It just spins and does nothing.
Ran Yast from terminal, it comes up with another message to report bug
Internal Error: Please report the bug report with logs. Run save_y2logs to get complete logs.
Caller: /uwr/lib64/ruby/vendor_ruby/2.6/0/yast/yast.rb:186:in "import_pure".
Details: Failed to import module 'PackageSystem' due to component cannot import namespace 'pkg'
Configuration:
uname -a
Linux linux-new 5.4.7-1-default #1 SMP Wed jan 1 07:55:50 UTC 2020 (34ebd01)
cat /etc/*release
LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64::core-3.2-x86_64:core-4.0-x86_64"
NAME="Opensuse Tumbleweed"
VERSION="20200110"
Does anyone have any ideas?

How to join an BITMAIN Antminer to a Microsoft Windows Server 2008 Active Directory

Let's start with "WHY?":#nerdsLoveToStartWithWhy
I'm developing a customized software to manage a crypto-mining farm where we need to communicate with miners (BITMAIN Antminer) by their hostname instead of IP (just for ease of use).
I know! But I don't want to scan IP ranges, then either SSH to them or use API to pull out the information such as the hostname
My Solution:(please share if you have a better solution)
I've configured a Microsoft Windows Server 2008 Active Directory & DNS with a domain name as ts.facility.com and I'm trying to join my Antminers to this domain.
Scenario:
The SRV1 is my AC DC and visible to the miners. The miner with a hostname as antMinerThree which is running a linux Angstrom V2013.12 are getting reply from the ACDC with its FQDN. the ntpdate package is installed as perquisite:
command: #opkg install ntpdate
Problem:
The problem for now is that when to install required packages:
samba
krb5-config
krb5-user
winbind
libpam-winbind
libnss-winbind
I got the following error: bmminer.list
Failed to open //var/lib/opkg/info/bmminer.list: No such file or directory.
and when I created manually an empty file bmminer.list in the path /var/lib/opkg/info/ I still get this error message, unless it no longer complains about missing bmminer.list:
Question
Does any body know, how to install required packages to joint this miner running Linux Angstrom V2013.12 to a Microsoft Windows Active Directory 2008 in order that I could ping my miners by hostname instead of by their IP addresses?

Create a Debian imaging server for windows 7

Issue
I have been tasked with creating a Debian imaging server for our company. Unfortunately my knowledge with, both Linux and servers is very limited, (this is part of an up-skilling program).
Steps
Currently I have tried to follow the below tutorials on creating a PXEBoot server and a ProxyDHCP:
ProxyDHCP:help.ubuntu.com/community/UbuntuLTSP/ProxyDHCP
PXE Boot : https://help.ubuntu.com/community/PXEInstallMultiDistro
PXE Boot : https://wiki.debian.org/PXEBootInstall#Installing_Debian_using_network_booting
Originally I had tried to used a configured DHCP server on the Linux server which I had gotten working, however my manager advised that they would prefer the DHCP to come from the router instead.
So I have used apt-get to install below applications and followed sources to get the configs correctly. However it still doesn't seem 100% correct (see latest)
Task
So currently the task I have been set is per below:
Has to be in Debian
Has to be console based server only (no gui interface)
DHCP has to come from router
Server should deploy windows images
Images taken need to bee compacted (all blank space removed)
I can only find Ubuntu guides for these PXEBoot and ProxyDHCP creations, and the problem with this is that the locations they refer to do not always exist in Debian.
So I am stuck with half the options available to me, and because I have a limited knowledge here, I cannot identify where I am going wrong, or if these locations are elsewhere.
Can anyone provide me with a tutorial, or a set of command lines to help?
I would really appreciate this.
Using
I am currently using (on Debian console):
TFTPD-HPA
DNSMASQ
iPXE
SysLinux
Latest
I have been able to get the dnsmaq and tftp-hpa service "working". This is to say when I run them they start. However I still don't seem to be able to boot into an installation with this up and running.
I have another thread on forums.debian.net/viewtopic.php?f=5&t=118315
I have been able to fix my issue using 3 applications and a lot of research.
The applications I have used are; DNSMASQ, TFTPD-HPA and SAMBA
These applications have been configured as per below:
TFTPD-HPA
`apt-get install tftpd-hpa
nano /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot/"
TFTP_ADDRESS="<server address>:69"
TFTP_OPTIONS="-4 –secure --create"
RUN_DAEMON=”yes”
OPTIONS="-l -s /tftpboot"
mk dir /tftpboot
mk dir /tftpboot/pxelinux.cfg`
DNSMASQ
apt-get install dnsmasq
nano /etc/dnsmasq.conf
Interface=eth0
port=0
log-dhcp
log-queries
log-facility=/var/log/dnsmasq.log
tftp-root=/tftpboot
dhcp-boot=pxelinux.0,<server name>,<server address>
dhcp-range=192.168.1.10,proxy,255.255.255.0
dhcp-no-override
pxe-prompt="Press F8 for boot menu", 2
pxe-service=X86PC, "comment", pxelinux
SAMBA
apt-get install samba
nano /etc/samba/smb.conf
[global]
Workgroup = workgroup
Server role = standalone server
Dns proxy = no
Wins support = yes
Passwd program = /usr/bin/passwd %u
Passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *Password\supdated\ssuccessfully*
Syslog = 0
Log file = /var/log/smb.log.%m
Max log size = 1000
Map to guest = bad user
Usershare allow guests = yes
Security = user
[images]
Comment = Network SAMBA share
Path = tftpboot
Create mask = 0775
Guest ok = yes
Browseable = yes
Read only = no
Writeable = yes

Forwarding X11 without SSH? How do I run local apps on another Pc running X Server?

I am using Cygwin X and Debian. I can forward my X session via SSH but what happens is that I seem to loose the display forwarding in the X session once in a while (from Cygwin to Linux). So i am guessing that that is an imnplementation thing with Cygwin because I never loose X11 display in the same ssh session when I use Linux to Linux.
This also happens when a X11 forwarded app tries to fork another process lets say I run Thunderbird and I click on a url inside an email. Naturally Thurderbird will try to start the default web browser but it is not doing it with Cygwin X server and here is the message I get when SSH session gives up the display for various reasons that I am not able to know.
"Error: cannot open display: localhost:10.0"
The other issue is that since the ssh gives up the display variable, I have to restart my ssh session to get it working which also kills other apps that I might be running during the ssh session.
Anyway after struggling with this for a while I am thinking that I want to be able to open my apps on another display without using ssh forwarding. I am using it internally and it is almost a closed lan so I am not worried about the security for now. I just want to be able to run the app on the Linux then see the app on the Pc that is running Cygwin.
I tried basic DISPLAY variable thing like "export DISPLAY=MY_CYGWIN_PC_IP:0.0" (on Linux Pc) but it does not work.
So I am wondering about how I can achieve this. What are the proper settings to achieve what i need?
Your direction was OK. export DISPLAY is what you want. But it is not enough.
On the target, you need to type
xhost +from.where.the.windows.are.coming.com
It gives the X server the permission to allow remote windows from this computer.
Beware, it is not really secure! A possible attacker could not only windows shown by you, but even control your mouse/keyboard. But for simple solutions, or if you can trust the remote machine and the network between you, it may be ok.
If not, there is an advanced authorization, based on preshared keys. It is named xauth. Google for xauth.
The Xorg server has an option to disable the remote windows, and there are distributions, (f.e. ubuntu!) who turn this option by default on. You can test it - if you can telnet to the tcp port 6000, it is allowed.
If you are using ssh -X, don't. Use ssh -Y
Cygwin XWin server randomly loses connection
Basically to work as old times , we need enable xdmcp on display manager and use X11 , Xwayland seems to me that doesn't work either.
sddm doesn't support xdmcp , but gdm does , you need edit /etc/gdm/custom.conf and add
[security]
DisallowTCP=false
[xdmcp]
Enable=true
xhost + ip_of_remote_computer
echo $DISPLAY (the number of the display usually :0 or :1)
after you can verify :
netstat -l | grep xdmcp
udp 0 0 0.0.0.0:xdmcp 0.0.0.0:*
lsof -i :xdmcp
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
gdm 862335 root 12u IPv4 71774686 0t0 UDP *:xdmcp
on remote host :
export DISPLAY="ip_of_server:0" (see if is 0 or other number in echo $DISPLAY on server mention above )
xclock &
References:
http://www.softpanorama.org/Xwindows/Troubleshooting/can_not_open_display.shtml
https://tldp.org/HOWTO/html_single/XDMCP-HOWTO/
https://wiki.archlinux.org/title/XDMCP

Tortoise SVN cannot connect to svnserve of newly created Subversion instance on SuSe Linux Server

I just started a new position where none of the code is in version control. One of my duties is to fix that. I have some space on a SuSe 10 box, and subversion 1.6 is installed. Following the instructions in the O'Reilly Subversion book, I've got a subversion repository with code in it, and svnserve running:
#lsof -i :3690
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
svnserve 15115 xxxxxx 3u IPv6 xxxxxxxx TCP *:svn (LISTEN)
Also, this command works
svnlook cat /home/svn/repos/ /project1/trunk/index.php
However, when I try to connect to the subversion repository from my desktop (running Windows) using TortoiseSVN, I get the error
Can't connect to host 'xxx.xxx.xxx.xxx': A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
I have tried multiple repository URLs, including:
svn://internalmachinename.internalnetwork.com/project1
svn://machinename/project1
svn://machinename/repos/project1
svn://machinename/svn/repos/project1
svn://xxx.xxx.xxx.xxx/project1/trunk:3690
I don't have access to Cygwin because of the company's firewall policy, so I can't try to connect via the command line.
Before trying to use svn, use the simple ping command to check the connection between the two computers.
Only if that works, go to the next step (which still isn't using svn!): check if you can reach the correct port using telnet.
Then, and only then should you try to use svn to do the connection.
The firewall suggestion was close - it was the firewall on my Windows desktop that was keeping Subversion from connecting.

Resources