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

hi am not able to ssh
ssh
0
Introduction to Web Design
LVL 19
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

I have Linux laptop.  It is running Ubuntu 18.04 LTS (64-bit)

I'll be creating Yocto Project or custom Linux distribution on my Linux laptop.  These embedded Linux distributions will be loaded on embedded target board.
Do I need xterm for creating Yocto Project?
My understanding is that 'xterm' emulates video terminal.  Since my Linux laptop already has a display, there is no need for 'xterm' program?

What might be the 'Window System' in my Linux laptop?  If it's not 'X Window System' then xterm won't apply?

Does 'xterm' program only apply when accessing Linux server from windows ssh?
0
Hello,
I get always this error on my postfix: Out: 250 2.0.0 Ok
 In:  AUTH LOGIN
 Out: 334 VXNlcm5hbWU6
 In:  dGVzdDFAaXAtMTQ3LTEzNS0yMjcuZXU=
 Out: 334 UGFzc3dvcmQ6
 In:  dGVzdDExMTE=
 Out: 535 5.7.8 Error: authentication failed: authentication failure
 In:  RSET
 Out: 250 2.0.0 Ok
 In:  AUTH LOGIN
 Out: 334 VXNlcm5hbWU6
 In:  dGVzdDFAaXAtMTQ3LTEzNS0yMjcuZXU=
 Out: 334 UGFzc3dvcmQ6
 In:  dGVzdDEyMjI=
 Out: 535 5.7.8 Error: authentication failed: authentication failure
 In:  RSET
 Out: 250 2.0.0 Ok
 In:  AUTH LOGIN
 Out: 334 VXNlcm5hbWU6
 In:  dGVzdDFAaXAtMTQ3LTEzNS0yMjcuZXU=
 Out: 334 UGFzc3dvcmQ6
 In:  dGVzdDEzMzM=
 Out: 535 5.7.8 Error: authentication failed: authentication failure
 In:  RSET
 Out: 250 2.0.0 Ok
 In:  AUTH LOGIN
 Out: 334 VXNlcm5hbWU6
 In:  dGVzdDFAaXAtMTQ3LTEzNS0yMjcuZXU=
 Out: 334 UGFzc3dvcmQ6
 In:  JW51bGwl
 Out: 535 5.7.8 Error: authentication failed: authentication failure
 In:  RSET
 Out: 250 2.0.0 Ok
 In:  AUTH LOGIN
 Out: 334 VXNlcm5hbWU6
 In:  dGVzdDFAaXAtMTQ3LTEzNS0yMjcuZXU=
 Out: 334 UGFzc3dvcmQ6
 In:  MTIz
 Out: 535 5.7.8 Error: authentication failed: authentication failure
 In:  RSET
 Out: 250 2.0.0 Ok
 In:  AUTH LOGIN
 Out: 334 VXNlcm5hbWU6
 In:  dGVzdDFAaXAtMTQ3LTEzNS0yMjcuZXU=
 Out: 334 UGFzc3dvcmQ6
 In:  MTIzMTIz
 Out: 535 5.7.8 Error: authentication failed: authentication failure
 In:  RSET
 Out: 250 2.0.0 Ok
 In:  AUTH LOGIN
 Out: 334 VXNlcm5hbWU6
 In:  dGVzdDFAaXAtMTQ3LTEzNS0yMjcuZXU=
0
Reopening this question.  I thought the issue was fixed, but it persists.

I am seeing a strange issue with sssd on Ubuntu 16.04.  I am using sssd to authenticate to AD.  The logins work great and is almost instantaneous as long as you have recently logged in (within the last minute or two).  If you wait longer between logins, then it will login you into, but you do not get a prompt for up to 30 seconds.

Note that these systems are in Azure and our AD is also in Azure.

I am using offline caching and setting the site.  I am stumped as to how to correct this issue.

Below are my conf files (sanitized for security).

-----------------------------------------------------------------------------------------
/etc/sssd/sssd.conf

[sssd]
services = pam, nss
config_file_version = 2
domains = xxxx.COM
#debug_level = 7

[domain/XXXX.COM]
dyndns_update = False
id_provider = ad
auth_provider = ad
access_provider = ad
krb5_realm = xxxx.COM
#debug_level = 4
default_shell = /bin/bash
ad_site = AH
cache_credentials = True
ad_enable_gc = False

# Use this if users are being logged in at /.
# This example specifies /home/DOMAIN-FQDN/user as $HOME.  Use with pam_mkhomedir.so
override_homedir = /home/XXXX/%u

# Uncomment if the client machine hostname doesn't match the computer object on the DC.
# ad_hostname = mymachine.myubuntu.example.com

# Uncomment if DNS SRV resolution is not workin#g
# ad_server = _srv_

# Uncomment if the AD domain is …
0
I'm trying to install Ubuntu on Hyper-V, using manual partitioning to create a separate partition for /, /Home, /var, var/log/audit, /swap, & /efi.

When installing with this option "Something Else" then specifying the partitions to use it fails to create shimx64.efi. preventing it from booting.
0
I followed CIS RHEL 7 benchmark hardening instructions to edit file below so as to make the
various settings (ie nosuid, noexec, nodev) permanent : guess this should stay across reboots:

However, after a reboot last Fri evening, those 'nosuid, noexec, nodev' settings are gone again:

[root@mesosph01]:/etc/systemd/system/local-fs.target.wants   <== this is the dir
$ more tmp.mount
[Mount]
What=tmpfs
Where=/tmp
Type=tmpfs
Options=mode=1777,strictatime,noexec,nodev,nosuid

$ ls -lad tmp.mount
-rw-------. 1 root root 91 Nov  8 17:23 tmp.mount

I tried to start a certain service mentioned in CIS doc using root; there's an error:
$ systemctl unmask tmp.mount

[root@mesopubp01]:/root
$ systemctl enable tmp.mount
Failed to execute operation: Invalid argument  <==


The following command was done last week Thu & it worked but after
reboot, the settings are lost:
$ mount -o remount,rw,nodev,nosuid,noexec,relatime /tmp
$ mount | grep /tmp
/dev/mapper/rhel-tmp on /tmp type xfs (rw,nosuid,nodev,noexec,relatime,seclabel,attr2,inode64,noquota)
0
I want to install that on my Ubuntu web server ( the web host already has a copy on there but cant config it to send me an email for this, so i have to have my own copy)... any tips on how to set it up so that I get an email whenever a specific domain on that box has a 500 error?
0
I'm looking to install Ubuntu, I need to specify Partitions in "Something Else".  How would i utilize this with the "Encrypt Ubuntu New Installation for security" option?  Also what's the best practices when manually creating partitions in Ubuntu?

Thanks!
0
Hello,
I have webmin installed on vps ubuntu 16.4 it's show me notification about virtual memory is full  is 256MB how I can increase   it ?
thanks.
0
I'm new to Glusterfs in general. We have chosen to use it as our distributed file system on a new set of HA file servers.

The setup is:
  • 2 SUPERMICRO SuperStorage Server 6049PE1CR36L with 24-4TB spinning disks and NVMe for cache and slog.
  • HBA not RAID card
  • Ubuntu 18.04 server (on both systems)
  • ZFS filestorage
  • Glusterfs 5.10

Step one was to install Ubuntu, ZFS, and gluster. This all went without issue.
We have 3 ZFS raidz2 identical on both servers
We have three glusterfs mirrored volumes - 1 attached to each raidz on each server. I.e.

And mounted the gluster volumes as (for example) "/glusterfs/homes -> /zpool/homes". I.e.
gluster volume create homes replica 2 transport tcp server1:/zpool-homes/homes server2:/zpool-homes/homes force
(on server1) server1:/homes     44729413504 16032705152 28696708352  36% /glusterfs/homes


The problem is, the performance has deteriorated terribly.

We needed to copy all of our data from the old server to the new glusterfs volumes (appx. 60TB).
We decided to do this with multiple rsync commands (like 400 simultanous rsyncs)
The copy went well for the first 4 days, with an average across all rsyncs of  150-200 MBytes per second.
Then, suddenly, on the fourth day, it dropped to about 50 MBytes/s.
Then, by the end of the day, down to ~5MBytes/s (five).
I've stopped the rsyncs, and I can still copy an individual file across to the glusterfs shared directory at 100MB/s.
But actions such as "ls -la" or "find" take forever!
0
Expert Spotlight: Joe Anderson (DatabaseMX)
LVL 19
Expert Spotlight: Joe Anderson (DatabaseMX)

We’ve posted a new Expert Spotlight!  Joe Anderson (DatabaseMX) has been on Experts Exchange since 2006. Learn more about this database architect, guitar aficionado, and Microsoft MVP.

Hello,
how I can block ip in ubuntu regarding list file ?
thanks.
0
i ubuntu 16.04( lxd ) i have a jar file. normally i create a link in /etc/init.d from jar file and systemctl daemon-reload, then i start my jar service(systemctl start "mt-service"
i did also here but servoces mark exited and say Docs: man:systemd-syv-generator(8).
...
What is wrong here?
0
I'm using C++,  WxWdigets and Ubuntu and sometimes my application needs to send TCP packets to a TCP server.
The packets are in this format:
std::array<uint8_t, 8> command1;

Open in new window

I'm using a non-blocking TCP client method from boost asio and it works pretty well.
The problem is that I need to change the content of command1 since I need to send 32 different values depending on users actions.

At the moment, I connect to the server by using start_connection() function which connects to the server and execute the function start_write(int scelta) which sends the command1 over the net.

I would like to call the start_connection() function by passing the value of command1 in order to send it with start_write() function.
Is there any solution to do this?
Or, is there a smarter and faster solution to acquire what I need?

#include <boost/asio/buffer.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/read_until.hpp>
#include <boost/asio/steady_timer.hpp>
#include <boost/asio/write.hpp>
#include <boost/bind.hpp>
#include <iostream>
#include <string>

using boost::asio::steady_timer;
using boost::asio::ip::tcp;

std::array<uint8_t, 8> command1;

class client
{
public:
  client(boost::asio::io_context& io_context)
    : stopped_(false),
      socket_(io_context),
      deadline_(io_context),
      heartbeat_timer_(io_context)
  {
  }

 
  void start(tcp::resolver::results_type

Open in new window

0
samba failed to start on ubuntu 16.04 server
system status smbd :
Failed to start LSB: start Samba SMB/CIFS daemon (smbd)
i reinstall install samba krb5-config krb5-user winbind libpam-winbind libnss-winbind
 
get error
Errors were encountered while processing:
 samba
 winbind
 libnss-winbind:amd64
 libpam-winbind:amd64
 samba-dbg
 initramfs-tools
 linux-image-4.4.0-166-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
0
ubuntu 16 under update failed :
dpkg: error processing package linux-image-4.4.0-166-generic (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
 linux-image-4.4.0-166-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

And i can't install samba and winbind on it.
0
i install nfs-server on ubuntu desktop 18.04
then share a directory on /etc/expports:
/mnt/sharedirectory client-ip(rw,sync,no_subtree_check)

from client ip i try to mount shared directory
mount -t nfs desktop-ip:/mnt/sharedirestory /mnt/srchive/
 mount.nfs: Connection timed out
nothing is in my auth.log or syslog.
from that client i mountet directories from other server . Then error should be in my desktop. But i can't see any.
0
What's the file system in the latest Ubuntu OS?  Any issues installing Windows 10 on the top of it from scratch and formatting?   For some reason some folks afraid doing it because it may 'crash' the HD.

No data need to be saved.
0
is there any graphical tools to monitor lxd?
what I want to see is cpu, men, disk, network trafik,.. .
0
Hello to everyone,

I'm trying to remove the nvidia driver from my system (running with debian 10). I tried several methods,but unsuccesfully. Something like these :

-) apt remove nvidia-driver
-) apt-get purge nvidia-driver

after that,when I reboot the PC,debian 10 restarts and I see this :

mario@DESKTOP-N9UN2H3:/home/mariozio# lspci -nnk -d 10de:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU102 [GeForce RTX 2080 Ti] [10de:1e04] (rev a1)
      Subsystem: ZOTAC International (MCO) Ltd. TU102 [GeForce RTX 2080 Ti] [19da:2503]
      Kernel driver in use: nvidia
      Kernel modules: nvidia

what to do ?
0
Starting with Angular 5
LVL 19
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

I have encrypted the volume using luks in centOS 6.3.
And generated the key added to the volume.
I have also added the entry in the /etc/crypttab for the encrypted volumes. As the volumes are from storage it takes more time for the server to reboot, so i have commented the /etc/crypttab entries to boot faster.

I Ubuntu I am am able to decrypt the volume using cryptdisks_start and in centOS 7 I use systemd-cryptsetup@<name>

Where as in CentOS 6.3 I am not able to find both the above commands.

My requirement is to boot decrypt the volume after the server boot's using a command like cryptdisks_start or systemd-cryptsetup@<name> .
0
Openstack swift issue.  I have all nodes running Ubuntu 16.04.4 LTS.  I have one controller node and 4 swift storage nodes.  All of the storage nodes have 1 boot drive and 3 data drives.  The first storage node works just fine.  However, it filled.  Upon which I realized the other 3 nodes are not working correctly.  It appears that the "boot" drive on the other 3 nodes is full.  However, I cannot find where the space is taken from.  The three data drives are mounted off of /srv/node/sda, /srv/node/sdc, and /srv/node/sdd (as described in the OpenStack documenation).  If I unmount them, I am still able to access those paths and see the contents.  So, it is saving the data to local disk and not the mounted disks???

Any help would be appreciated.
0
Hello.

I'm trying to enable the passthrough on my graphic card (nvidia RTX 2080 ti on CPU I9 - 9900k) on the Debian 10,following this tutorial :

https://passthroughpo.st/gpu-debian/
 
These are the commands that I gave :

nano /etc/initramfs-tools/modules

adding this line :

vfio_pci ids= 10de:1e04,10de:10f7

below you can see how I have got that numbers :

ziomario@DESKTOP-N9UN2H3:/home/mariozio# lspci -nn | grep 01:00.

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU102 [GeForce RTX 2080 Ti] [10de:1e04] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation TU102 High Definition Audio Controller [10de:10f7] (rev a1)

and then :


update-initramfs -u
update-initramfs -u -k all

and

nano /etc/modprobe.d/blacklist.conf

adding these lines :

blacklist nouveau
options nouveau modeset-0

the tutorial does not explain if I should modify also the file /etc/default/grub. Anyway I tried,adding this line :

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on iommu=pt"

instead of the old one,that was :
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

and then I did again :

update-initramfs -u
update-initramfs -u -k all

but the result does not change. During the boot I see the blinking cursor hanging on the screen and nothing happens anymore. I have even removed all the changes that I made and I did again :


update-initramfs -u
update-initramfs -u -k all
0
Hello,
I have ubuntu vps and I want to install on it a control panel to allow managing hosting through web like create users and websites for them and specify for each website ghis php version and so on, something like cpanel/plesk bot open source and free, any suggestion?
Thanks
0
i try to start a lxd conatiner. I get error :
Error: Common start logic: Set last ID map: json: cannot unmarshal number into Go value of type [idmap.IdmapEntry
i try to change  volatile.idmap.next value sat to [] and start lxd
my config show:

config:
  image.architecture: amd64
  image.description: ubuntu 18.04 LTS amd64 (release) (20190604)
  image.label: release
  image.os: ubuntu
  image.release: bionic
  image.serial: "20190604"
  image.version: "18.04"
  security.idmap.base: "10000000"
  security.idmap.isolated: "true"
  security.idmap.size: "200000000"
  volatile.base_image: c234ecee3baaee25db84af8e3565347e948bfceb3bf7c820bb1ce95adcffeaa8
  volatile.eth0.hwaddr: 00:16:3e:6b:be:cb
  volatile.idmap.base: "200000000"
  volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":10000000,"Nsid":0,"Maprange":200000000},{"Isuid":false,"Isgid":true,"Hostid":10000000,"Nsid":0,"Maprange":200000000}]'
  volatile.idmap.next: '[]'
  volatile.last_state.idmap: "3000000000"
  volatile.last_state.power: STOPPED
devices: {}
ephemeral: false
profiles:
- lanprofile
stateful: false
description: ""
0
I'm using WxWidgets and C/C++ under Ubuntu to write an application that use data coming from a magnetic card reader.
@sarabande gave me support to perform the string parsing and it works great!

Now, I would like to improve the code used to read the data since I realized that sometimes the users do not correctly swipe the card and the system is not able to process the string.

If the card is correctly swiped, the string is:

%URSMCC84R04E815LURSO  MARCO_ò8038001605011036724_

When the user fails to swipe the card, it usually produces a shorter string with strange characters or just a subset of the original string. For this reason, I'm trying to check the correct length of the string (it should be 53 characters) and if it's different, then the user gets an error.

It seems to work, but I would like to improve it.
Do you have suggestions, please?
If the swipe is not correct, the text  control should be cleared in order to accept a new string from the card reader (which acts like a keyboard).

void ProjectFrame::OntesseraText2(wxCommandEvent& event)
{
    wxString stringa_tessera = tessera->GetValue();
    // I read the string coming from the USB reader
    stringa_tessera.Length();
    int counter = static_cast<int>(stringa_tessera.Length());
     printf("Counter: %d\n", counter);
    if(counter > 52){

    wxString number = stringa_tessera.Mid(1, 16);  // Mid starts at offset 1 and takes 16 chars
    wxString rest = stringa_tessera.Mid(17);                

Open in new window

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.