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
0
Learn SQL Server Core 2016
LVL 13
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

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. :)
0
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)
CONCSUB apps/<apps passwd> SYSADMIN 'System Administrator' SYSADMIN CONCURRENT FNDIMON DEACTIVATE FNDIM_SRVRNAME

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
0
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

Ulrich
0
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.
0
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 "test.py" 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 test.py:

#!/usr/bin/python
from w2k203dpi import Printer

p = Printer()

p.println('test')

p.bold(True)
p.println('test')
p.bold(False)

p.underline(True)
p.println('test')
p.underline(False)

p.qrcode('test')

p.fullcut()

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:
           self.f.write(i)
        self.f.flush()

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

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

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

Open in new window

0
hello,
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

thanks,
0
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.

Regards,
0
Hello!
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?
0
Hello!
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

0
Announcing the Winners!
LVL 13
Announcing the Winners!

The results are in for the 15th Annual Expert Awards! Congratulations to the winners, and thank you to everyone who participated in the nominations. We are so grateful for the valuable contributions experts make on a daily basis. Click to read more about this year’s recipients!

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.
0
Hello!
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.
0
Hello

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:

SMTP

19:03:25 Ready to run action (retry count: 0)
19:03:25 Clearing connection to zimbrams.domain.com
19:03:25 Trying to connect to zimbrams.domain.com on port 465 (CFNetwork) with STARTTLS (required)
19:03:25 Resolved hostname (zimbrams.domain.com).
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

or
MBP13:~ alex$ telnet zimbra.domain.com 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)

webmail

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

Open in new window

0
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
0
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
"READ<CR><LF>"

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

0
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
0
I have an electronics board which has 16 relays and it works over TCP/IP.
The IP address of the board is 192.168.1.4 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..
"580111000000036D",
"580112000000046F",
"580111000000046E",
"5801120000000570",
"580111000000056F",
"5801120000000671",
"5801110000000670",
"5801120000000772",
"5801110000000771",
"5801120000000873",
"5801110000000872",
"5801120000000974",
"5801110000000973",
"5801120000000A75",
"5801110000000A74",
"5801120000000B76",
"5801110000000B75",
"5801120000000C77",
"5801110000000C76",
"5801120000000D78",
"5801110000000D77",
"5801120000000E79",
"5801110000000E78",
"5801120000000F7A",
"5801110000000F79",
"580112000000107B",
"580111000000107A",
"5801130000FFFF77",
"580113000000007B",
"5801100000000069"

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

echo '580112000000016C' | xxd -r -p | nc 192.168.1.4 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 …
1
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.
0
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 that.how 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.
0
Exploring SharePoint 2016
LVL 13
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

how to connect a backend ldap (fx. slapd)  with a samba (ubuntu) active directory?
0
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.
0
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!
0
How do I disable chef-client on a node?  7 days then autoenable is preferred.
0
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
/usr/bin/awk

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

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

sudo apt install apt-show-versions
0
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/127.0.0.1" -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: bshmsn.sharzad@process-factory.dk

SUDO=/usr/bin/sudo
alias direc="cd /usr/local/nagios/libexec"
# . check docker container
ERROR_CODE1=-1
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
        ERROR_CODE1=1
elif [ $statu = 'CRIT' ]; then
        echo $all
        ERROR_CODE1=2
elif [ $statu = 'OK' ]; then
        echo $all
        ERROR_CODE1=0
fi
exit $ERROR_CODE1
------

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 127.0.0.1 -c check_dock
NRPE: Unable to read output
0

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.