Linux OS Dev

Kernel programming for Linux operating systems can be done with many different languages; C, C++, Python, Perl and Java, which are some of the most common languages used.There are also many different varieties of Linux, such as Ubuntu, Fedora and OpenSUSE.

Share tech news, updates, or what's on your mind.

Sign up to Post

i update (normal update after that upgrade ) my ubuntu 16 domain server(samba4 domain server)
After that not possible to login as domain user only on that server.
Authlog (under /var/log) says: fatal: Access denied for user [REALM]\\\\user by PAM account configuration [preauth]
debug1: do_cleanup
debug3: monitor_read_log: child log fd closed
debug3: sshpam_thread_cleanup entering
debug1: audit_event: unhandled event 12
Why Diversity in Tech Matters
LVL 13
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

I have two accounts with the same hosting provider.  They allow SSH access.  I created backup copies of websites on one account that I need to move to the other account.

I can move them individually, explicitly with "wget" but if I try to just pull all files from that one directory it fails.

Here is the command I am using, there are NO other sub-directories, just a bunch of files in one directory that I want to copy over from Account A to Account B.

wget -nc --level=1 --recursive --no-parent --accept jpa <url>/backups/

All I get when I run that command in the SSH portal is an "index.html" file and nothing more.  No error, just that one file (which is then automatically removed because it is not on my accept list).

I see other people (in general) are having a similar issue on StackOverflow (for example).

Server restriction maybe?  Problem with the command?

Thanks. :)
How to deactivate Oracle EBS "Internal Monitor" from the command line or sqlplus

I tried this but the "Internal Monitor" was still running. (even after restarting the apps)

Linux SRVRNAME 3.0.101-108.52-default #1 SMP Tue May 29 19:42:53 UTC 2018 (80e6815) x86_64 x86_64 x86_64 GNU/Linux

 Internal Monitor
Hi there.

My brother got an issue with a Seagate Central network disk. The network part doesn't work anymore, and he wants to rescue the data and copy to a usb-disk/computer drive etc...
The challenge is that Seagate utilizes a file format related to Ubuntu/Linux. He tried to pull out the hard disk from the storage unit and hook up to a Windows computer via USB. That didn't work that well, because the 3TB drive apparently is formatted in like 500GB partitions with a Ubuntu/Linux format. That is not recognized by Windows.
So the task is how to move/copy data to a "normal" disk that will work with Windows.
I found a Gparted software that is supposed to do the trick, but we're a bit insecure about what to do and if this is the right procedure.
Did any of you out there try a similar task? We would prefer if it's possible to do the whole thing with a Windows based software.
Looking forward to your suggestions.  :-)

Best regards

I created an Azure VM using the CIS Hardened Ubuntu image. When setting up the VM I chose to use a public/private key to access the VM. This was in April of this year. Now when I logon its telling me my password has expired but we never gave the user a password.

I'm guessing that this is due to the hardened CIS image and it wants us to change the password. However we dont know what the old password would be. Using the serial console in Azure I can create another admin user and i tried to use chage -d -1 <user> but that doesnt seem to work.

I'm wondering if anyone else has come across this issue or can help me find a way to remove the password expiration.
I'm having serious problems to make my kiosk printer (Nippon Primex NP-VK30) work correctly under Ubuntu 19.04.
The manufacturer provides no support for Ubuntu, but I've found on Github a very simple library made in Python.
I attached the Python files to this topic.

I tried to launch "" and my printer worked fine!

Since I need to print some text strings from my C/C++ application, I would like to translate the python code into C/C++ code so I can easily import it in my original application.

Unfortunately, I'm just a beginner and I never coded in Python.
Can you help me, please?

Thank you!

This is the code for

from w2k203dpi import Printer

p = Printer()






Open in new window

This is the code for the class file:

class Printer:

    def __init__(self):
        DEVPATH = '/dev/usb/lp0'
        self.f = open(DEVPATH, 'w')
        self.mode = 0x00

    def raw(self, data):
        for i in data:

    def esc(self, data):
        self.raw('\x1b' + data)

    def font(self, value):
        if value:
            self.mode |= (1 << 0)
            self.mode &= ~(1 << 0)
        self.esc('!' + chr(self.mode))

    def bold(self, value):
        if value:
            self.mode |= (1 << 3)

Open in new window

i need to install an erpnext open source in my company, could anyone provide me with guide to install it i tryed many links but not working,
installing can be on ubuntu 18.04 or cento 7

Dear All,

I deployed the OpenWRT on some devices, I have a Wireless Zigbee module (CC2531) and plug-in this module into the device via USB port.

Please let me know where is the driver of "Zigbee module" and it can run on OpenWRT.

Thank in advance.

I've found onine is pretty decent video tutorial about BASH. But it's dated around 2010. I think Ubuntu 10.10 or so... You think I can still learn today by using that old tutorial or there're changes in BASH in last years that render that course obsolete?
I've got Ubuntu 16.04 and OpenVPN installed and seems to be working fine. But when I check firewall rules using "sudo ufw status", then I see this:
Status: active

To                         Action      From
--                         ------      ----
80                         ALLOW       Anywhere                  
443                        ALLOW       Anywhere                  
53                         ALLOW       Anywhere                  
465                        ALLOW       Anywhere                  
25                         ALLOW       Anywhere                  
110                        ALLOW       Anywhere                  
995                        ALLOW       Anywhere                  
143                        ALLOW       Anywhere                  
993                        ALLOW       Anywhere                  
10025                      ALLOW       Anywhere                  
10024                      ALLOW       Anywhere                  
80 (v6)                    ALLOW       Anywhere (v6)             
443 (v6)                   ALLOW       Anywhere (v6)             
53 (v6)                    ALLOW       Anywhere (v6)             
465 (v6)                   ALLOW       Anywhere (v6)             
25 (v6)                    ALLOW       Anywhere (v6)             
110 (v6)                   ALLOW       Anywhere (v6)             
995 (v6)                   ALLOW       Anywhere (v6)             
143 (v6)                   ALLOW       

Open in new window

OWASP: Avoiding Hacker Tricks
LVL 13
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

i have an iso of 18.04.3 desktop-amd64.iso.  how do i burn this to a dvd?  i've done it before but i forget.  i'm currently running ubuntu 16.04.
I have Ubuntu 16.04 (Desktop Edition) with OpenVPN server and BIND9 installed. I used a script when I installed OpenVPN. My OpenVPN client is a W10 netbook with 4G USB modem.
When I choose to use Google DNS during OpenVPN installation then I can surf the Internet via OpenVPN just fine (on my OpenVPN client W10 machine). But if I choose to use a current DNS settings (ie. my own BIND9 server), then I can connect from client to server, but DNS doesn't work. I know that I must edit config file of OpenVPN server server.conf AND to also edit client.ovpn client's OpenVPN file too. And I don't know exactly whether my DNS server (BIND9) is properly configured to play this kind of role.
When I go to W10's CMD and do ipconfig /all I do see DNS server with a correct IP of my BIND9 (it's a public IP of my Ubuntu machine, actually). Nevertheless, DNS doesn't work on a client machine and I couldn't find a complete step-by-step manual how to enable this scheme.

Having a somewhat surprising issue - our mail flow on our Zimbra server is down (both inbound and outbound) yet the server seems healthy and no error seems reported.

1. Server is up (8.8.10_GA_3786) on Ubuntu 16
2. Admin health status page shows every service up & running (green)
3. Webmail access is ok
4. IMAP access is ok

However, no mail is flowing in or out.

Trying to send triggers the following errors:


19:03:25 Ready to run action (retry count: 0)
19:03:25 Clearing connection to
19:03:25 Trying to connect to on port 465 (CFNetwork) with STARTTLS (required)
19:03:25 Resolved hostname (
19:03:25 Error: Connection error (Connection refused).
19:03:25 Error code: 2
19:03:25 Failed action (0). Reset observed read/write timeouts: 8/8

Open in new window

MBP13:~ alex$ telnet 25
Trying *.*.187.68...
telnet: connect to address *.*.187.68: Connection refused
telnet: Unable to connect to remote host
MBP13:~ alex$ 

Open in new window

(ie the connexion is actively refused)


method:	[unknown]
msg:	try again: Unable to connect to the MTA
code:	mail.TRY_AGAIN
detail:	soap:Receiver
trace:	qtp66233253-2518:1568314842997:7a36c58c222c3898
Body: {
  SendMsgRequest: {
    _jsns: "urn:zimbraMail",
    m: {
      e: [
        // [0]:
          a: "",
          t: "t"
        // [1]:

Open in new window

i take a snapshot of my lxd:
i stop lxd (lxd stop "server_name) then i take snapshut (lxc snapshot "server_name" "snap_name")
i check with lxc ls snap was created and i start server (lxc start " servername) i make a ls igen lxc ls snapshot was there.
now i try to restore to snapshut
i  make lxc ls   snapshot for that server missing. the snapshot column is 0 .
is it possible to this snapshot is hide under some place and can restore to that
I have a digital scale connected via USB to my Ubuntu laptop and I would like to read the measurements from it.
The serial protocol is very simple (9600,8N1, ttyUSB0) and I'm able to correctly read the measurements by using putty (VT100+) from terminal.

The scale needs to receive the command

Open in new window

in order to send the measurement.
Each measurement has this format:
01ST,GS,   2.5,kg<CR><LF>

Open in new window

if, for example, I'm measuring a 2.5Kg load.

Now, I'm trying to send the READ command from a C application, but I'm not able to get any answer.

#include <errno.h>
#include <fcntl.h> 
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>

int set_interface_attribs(int fd, int speed)
    struct termios tty;

    if (tcgetattr(fd, &tty) < 0) {
        printf("Error from tcgetattr: %s\n", strerror(errno));
        return -1;

    cfsetospeed(&tty, (speed_t)speed);
    cfsetispeed(&tty, (speed_t)speed);

    tty.c_cflag |= (CLOCAL | CREAD);    /* ignore modem controls */
    tty.c_cflag &= ~CSIZE;
    tty.c_cflag |= CS8;         /* 8-bit characters */
    tty.c_cflag &= ~PARENB;     /* no parity bit */
    tty.c_cflag &= ~CSTOPB;     /* only need 1 stop bit */
    tty.c_cflag &= ~CRTSCTS;    /* no hardware flowcontrol */

    /* setup for non-canonical mode */
    tty.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON);
    tty.c_lflag &= ~(ECHO | ECHONL | ICANON |

Open in new window

i have slapd on my ubuntu 18.04 services is running and ok
i try ldapsearch -x get error : Operations error (1)
Additional information: 00002020: Operation unavailable without authentication
and in /var/log/auth.log: ldapsearch: DIGEST-MD5 common mech free
I have an electronics board which has 16 relays and it works over TCP/IP.
The IP address of the board is and the port is 3000.
I would like to control it with C/C++ under Ubuntu.

There is a list of HEX commands that it is possible to use in order to remotely switch ON and OFF each relay on the board.
This is the list:
"580112000000016C",  // switch on the relay 1

"580111000000016B",  // switch off the relay 1
"580112000000026D", // switch on the relay 2
"580111000000026C", // switch off the relay 2
"580112000000036E", // so on..

I'm correctly able to switch on and off each relay by sending command line commands under Ubuntu:

echo '580112000000016C' | xxd -r -p | nc 3000

Open in new window

The above code correctly turns on the relay.

I would like to do the same with C/C++ code since I want to control the …
Hello expert,
We are not able to run any command in our Ubuntu 18 LTS and we are getting the following error "cannot create temp file for here-document: No space left on device". So, how can I free up space if the root account is itself looked.
i have a nas which is mounted in ubuntu 16.
nas is restarted and ubuntu missing this mount.
Now i can't mount it because the old one is running i can't find the process via ps -ef | grep nfs
and i do not like to reboot server because of to find process it's no possible to make ls -l /mnt/archive because it old one running
i can without any problem mount it under fx. /test but i need to stop the old one.
Become a CompTIA Certified Healthcare IT Tech
LVL 13
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

how to connect a backend ldap (fx. slapd)  with a samba (ubuntu) active directory?
I've written some simple Python scripts and now I would like to write a Python script that can be installed and run as a service.

I know how to take a Python program and run it as a service but how would I write a Python program that can be installed?

My operating system is Ubuntu 18.04.
I'm developing a WxWidgets application under Ubuntu and I'm using CodeBlocks as IDE.

I need to:

  • read the data stored in a magnetic card band
  • check if they are OK
  • parse the string in order to get the code, the name and the surname

I'm using a USB magnetic card reader and I set a TextCtrl as "focused" so it immediately gets the data from the reader automatically.

The format of the string is like this:

%URSMCC84R04E815LURSO  MARCO_ò8038001605011036724_

Open in new window

The control characters are always the same and I need to read everything between % and _.
I need to obtain three strings:
  • the first one containing the first 16 chars
  • the second contains the surname which goes from the 17th till the first space
  • the third string contains the name and goes from the first char after the space till the _

What is the best way to do this in Wxwidgets?
Moreover, since the reader emulates a keyboard, the output string is read a char at a time, so how can I design the parsing code?

This is the code I'm using to read the string.

void ProjectFrame::OntesseraText(wxCommandEvent& event)
    wxString stringa_tessera = tessera->GetValue(); // I read the string coming from the USB reader
    TextCtrl2->ChangeValue( stringa_tessera ); // I load the string in the second TextCtrl just for test

void ProjectFrame::OnTextCtrl2Text(wxCommandEvent& event)
// TextCtrl used to display the parsed string

Open in new window

I see that there is a class wxStringTokenizer, should I use it?
I'm sorry but I'm just a beginner :(

Thank you!
How do I disable chef-client on a node?  7 days then autoenable is preferred.
Is gawk package installed in my linux laptop?  My linux distribution is Ubuntu 18.04 LTS

@system76-pc:~$ awk --version
awk: not an option: --version

@system76-pc:~$ which awk

@system76-pc:~$ apt-show-versions awk

Command 'apt-show-versions' not found, but can be installed with:

sudo apt install apt-show-versions
i have a very little script which is running when i use   $ ./check_dock
docker -com.... ok cpuuerc 0.xx%
 when i used in $ ./check_nrp -H "ip/localhost/" -c check_dock
return:  NRPE: Unable to read output
all other command i defined in nrpe is running.
What i missing here?

my check_dock scripts is:
#!/bin/bash -el
# Author: Bahman Sharzad
# Mail:

alias direc="cd /usr/local/nagios/libexec"
# . check docker container
statu=$((sudo /usr/local/nagios/libexec/check_docker -n $1 -c 80,90) | awk '{print $2}')
#echo $statu
all=$(sudo /usr/local/nagios/libexec/check_docker -n $1 -c 80,90)
#echo $all
if [ $statu = 'WARN' ]; then
        echo $all
elif [ $statu = 'CRIT' ]; then
        echo $all
elif [ $statu = 'OK' ]; then
        echo $all

and command in nrpe is
command[check_dock]=/usr/local/nagios/libexec/check_dock docker-compose_mongodb_1
i run command :  $ sudo ./check_nrpe -H -c check_dock
NRPE: Unable to read output

Linux OS Dev

Kernel programming for Linux operating systems can be done with many different languages; C, C++, Python, Perl and Java, which are some of the most common languages used.There are also many different varieties of Linux, such as Ubuntu, Fedora and OpenSUSE.