here is the script sample.expect : expecting to log into the host as sudo user. but getting issue [sudo] password for USER: invalid command name “sudo” while executing “sudo” invoked from within “expect “[sudo] password for USER:”” (file “sample.expectR…
Tag: linux
How to fix wmctrl Cannot open display when Python open subprocess
This is my program, and it works very well. Output: But if I want to run this program at startup as root in Linux Mint I have problems. I want to run this py file at startup as root but I don’t know how to do it. The main question is how to do it. This is my attempt to
Locating ODBC Driver 13.0 for SQL Server on Ubuntu Azure VM
I have a python script that requires ODBC Driver 13.1 for SQL Server to connect and write to a SQL Server. I am trying to setup the script on a Linux VM running Ubuntu 16.04 on Azure. I am having trouble locating the location of the driver to use in my script. I have followed the instructions here on installi…
Running bash script on multiple shells
So I was trying to create a script on bash shell, I came to know that the script doesn’t run on ksh or dash shells. So my question is how you make a script to run on all 3 (bash, dash & ksh) shells. Answer In order to write a script that is guaranteed to be portable between the various
RPM SPEC Systemd enable and start
I have created a RPM SPEC file but I am struggeling with Systemd enabling and starting. Updating the package through yum disables and stops the service. The distribution is Centos 7.x I have installed the service under /etc/systemd/system. This is what I have tried so for but it does not work. I have not foun…
Unable to exit while loop after reading information written to pipe
TLDR: You have to close the write end of all pipes in all children. The read will detect EOF only if no process has the write end still open. Credits to @Bodo As part of an assignment for an operating systems course, I’m trying to read lines from a file which is in the format of x operand y and
How to Handle the Windows Authentication in Linux Machine?
1.I launch my Application 2. It will ask for my Azure email ID for Authentioncation, Once its provided . 3. Then it will ask for Windows “username” and “password” for Authentication 4.In Linux how to Handle this windows Authentication ??? Help me out on how to handle this .I tried the …
Avoiding kinit when cache still has credentials
I have a systemd service that calls a webservice to perform some maintenance periodically (every minute). The service looks like: now this destroy and reinitializes my kerberos ticket every time. the kinit can take up to 2-3 min. I would like to avoid that step and only kinit if needed. any ideas? Answer Afte…
How to run a dockerfile?
Found a dockerfile that want to create image and run: https://gist.github.com/matsuu/d5b4e83b3d591441f01b7be2ede774e2 Stored it in a new folder as centos-redhat-8-beta.dockerfile on my computer and tried: What is exact command that need to run? Answer Dockerfile is not an extension, per default the file shoul…
Redhat/CentOS – `GLIBC_2.18′ not found
I was trying to run redis server (on a CentOS server) with specific module: and getting error: this is the linux version: Also this is what is showing for /lib64/libc.so.6: Also: Tried as well: What is the process of installing/setting GLIBC_2.18 on Centos/Redhat servers? Thanks.. Answer You can upgrade to th…