I have a linux dhcpd log that I need to get a list of only the MAC addresses. The MAC addresses are formatted like 00:ab:27:d8:dd:dd Using linux command line tools,parse INPUT file for MAC addresses and send to OUTPUT file. Where OUTPUT file is just a list of the MAC addresses, where then duplicate MAC addres…
Tag: linux
Gitlab avoid user login via SSH
When I create a user on Gitlab, it creates a regular user on linux and it can login using a regular SSH protocol with same password an user. How can I disable the SSH login using SSH to desired users? All my server is exposed to that users. Thank you Answer Edit the sshd_config file adding this line Read more…
How can my Linux program get a computer-is-about-to-go-to-sleep notification, without modifying any system config files?
I wrote a Linux program that creates some persistent TCP connections, and I would like my program to close() those TCP sockets just before the Linux-computer goes to sleep, so that the remote peer isn’t left with a non-responsive “zombie” TCP connection. According to this answer, one way to …
Downloads hang/fail after ~80kb using NGINX reverse proxy [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …
Web Server/Web service written in C++ in Linux
The requirement is to have Linux machine without additional installations aka Java, apache tomcat/jboss, that will be able to serve as a web server and to accept web service request (I will have to write some web service in C++ that will serve under this web server). So, the question is if there is some C++ l…
What is a good Inter-Process Communication method between C and PHP in Linux
I actually don’t know whether I am asking a proper question. Let me describe my problem first. End user <-1-> web server (by PHP) <-2-> an internal process (by C or C++) <-3-> an external hardware The 1 should be something like ajax request. The 2 should be something like inter-process…
gtkmm, how to set a tool bar?
I want to have my toolbar at the top of the window, not vertically expanding and I want the entry to expand horizontally. Here a code : main.cc I don’t understand what is the difference between expand and fill, there are two functions, set_hexpand() and set_vexpand() whatever I tried (the last two hours…
Disable OpenGL for Python / Matplotlib
I’m doing a Python course for which I have installed Arch Linux in a VM. When I use Matplotlib.pyplot to plot things (x vs y) I get a bunch of errors. When I turn of 3D support for the VM it simply asks for openGL. My script does create a plot (empty canvas) but without a line. I think it
SSSD and sudo: mismatch between sudoHost and server hostname
I’m running SSSD/LDAP on CentOS6 to authenticate users and I’ve configured it also to get SUDO information from the LDAP server. If I run hostname on my server I get: I configured sssd.conf with a search base, for example: Users who have SUDO rights on this machine have this kind of entry: Now, as…
How to confirm SFTP file delivery?
I am sending a file using SFTP and public key for non-root user, looks like the file is sent, but I cant find it on the target folder, maybe due to permission. here is the -vvv : target directory How can I make sure the file is delivered, without server access ? Answer All you can do is to check