Wednesday, December 29, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


View file names in hex?

Posted: 29 Dec 2021 10:52 AM PST

I have some files with special characters like accented letters. They are valid names, but for some reason when they are copied across the network to a drive, maybe in another format, the name still looks the same but it is not the same. I can copy the file back and now I have two files that appear to have the exact same name in the exact same path. My guess is there are two different values represented the accented letter so they appear the same. Is there any way to view the hex of the name itself, not the file?

This is important because one of my synching apps is getting confused and creating duplicates.

How do I start Ubuntu's ufw before fail2ban to solve a loss of connectivity issue?

Posted: 29 Dec 2021 10:41 AM PST

My skill level configuring systemd is more of a newbie and need help as I've now hit a road block and I'm stuck.

I have fail2ban and ufw installed on a Raspberry Pi clone board. The problem I've identified is that there are now over 1000 IP addresses blocked and in fail2ban's database. Also ufw also starts-up as inactive. If I issue "sudo ufw enable" too soon then all network connectivity is lost and I have to use the board's power button to shut-down and power-off the Ubuntu Linux OS on the board.

Wjhat I believe is happening is while fail2ban is populating iptables and ip6tables when ufw starts, fail2ban already has iptables running and ufw's rules get messed up.

Does anyone know how, using systemd, I can prevent the fail2ban.service from starting until ufw.service starts?

how to install eapol_test in ubuntu

Posted: 29 Dec 2021 11:18 AM PST

I'm tired idea how to install this package eapol_test, I read online how I can make install it, but it didn't work for many time so How can I Install the eapol_test in Ubuntu in a simple and concise way ? (My Ubuntu 20.04.3 )

SOLR ports in use

Posted: 29 Dec 2021 11:01 AM PST

I am running Ubuntu 18.04LTS and have Solr 8.7 installed. All is running fine, but I did a ps -aux and found that in addition to port 8983, java is also listening on port 7983. Yet I find no reference to this port anywhere. Does anyone have any idea of what this port is used for with Solr?

Proxmox install USB boot stick doesnt get rocgnized, but ubuntu USB boot stick does

Posted: 29 Dec 2021 10:06 AM PST

I want to install Proxmox on my Server. Currently there is no OS installed. When I plug in my Proxmox USB boot Stick and power the Server on, it doesnt get recongized. When I plug in a Ubuntu 18 USB boot stick it boots perfectly fine on it.

I also tried plugging in the Proxmox stick on a laptop, but it also didn't recongize it. The laptop did recognize the Ubuntu stick tho aswell.

My Server is a DELL PowerEdge R720xd 2x Xeon E5-2680v2

Is there a way to completely restrict using swap if there are buffers/cache in use? And use swap only to prevent Out-Of-Memory Killer

Posted: 29 Dec 2021 10:04 AM PST

Is there a way to completely restrict using swap if there are buffers/cache in use? And use swap only to prevent Out-Of-Memory Killer.

Is there a way to forbid using swap are there still buffers/caches that could be flushed?

What swappineess vm.dirty_bytes vm.dirty_background_bytes vm.dirty_bytes or other options should I tweak?

The reason why I need it: I have proprietary software that doesn't work properly if a swap is used, but the system consumes a lot of buff/cashe.

If I manually (and regularly every 2-3 hours) clean buff/cache by using this command sync; echo 3 > /proc/sys/vm/drop_caches everything works fine.

But if I just let it be, the software starts to perform badly.. (even if I have set up vm.swappiness=1, it just give it a little bit more time to live))))

Fluxbox fails to open confext menu

Posted: 29 Dec 2021 10:03 AM PST

When I click RMB on a desktop or a window frame no context menu pops up. I do have the ~/.fluxbox/windowmenu file. It is owned by user and it looks OK. In ~/fluxbox/init is the line:

session.screen0.windowMenu: /home/haines/.fluxbox/windowmenu

Bash: Append rows from multiple files to one output file and add file name as column

Posted: 29 Dec 2021 10:14 AM PST

This is a continuation of my previous question Bash: Choose row with the highest value in specified column in multiple files and create one output file with rows containing the max

The solution I used is:

for file in mi*  do      sort -k14,14 -n $file | tail -1  done > result    

I am wondering if there is an easy way to edit this code so that when I create the output file I can add a column that contains the file names, or if I need to use a different approach.

I found this question Bash Command Get Data from multiple files and append the file name but I am not sure how to adapt it for my needs

Set immutable bit for specified time

Posted: 29 Dec 2021 09:35 AM PST

It's possible to set immutable bit for a specified range of days?

I was trying to understand how Veeam11 can change the attribute after a few days for immutable backup

Chapter 3 Packages and patches virtual box problems

Posted: 29 Dec 2021 09:58 AM PST

I am making LFS I am curently at packages and patches. I ran command

pushd $LFS/sources  md5sum -c md5sums  popd   

and it gave me

pushd $LFS/sources  md5sum -c md5sums  popd  /sources /sources  acl-2.3.1.tar.xz: OK  attr-2.5.1.tar.gz: OK  autoconf-2.71.tar.xz: OK  automake-1.16.4.tar.xz: OK  bash-5.1.8.tar.gz: OK  bc-5.0.0.tar.xz: OK  binutils-2.37.tar.xz: OK  bison-3.7.6.tar.xz: OK  bzip2-1.0.8.tar.gz: OK  check-0.15.2.tar.gz: OK  coreutils-8.32.tar.xz: OK  dbus-1.12.20.tar.gz: OK  dejagnu-1.6.3.tar.gz: OK  diffutils-3.8.tar.xz: OK  e2fsprogs-1.46.4.tar.gz: OK  elfutils-0.185.tar.bz2: OK  expat-2.4.1.tar.xz: OK  expect5.45.4.tar.gz: OK  file-5.40.tar.gz: OK  findutils-4.8.0.tar.xz: OK  flex-2.6.4.tar.gz: OK  gawk-5.1.0.tar.xz: OK  gcc-11.2.0.tar.xz: OK  gdbm-1.20.tar.gz: OK  gettext-0.21.tar.xz: OK  glibc-2.34.tar.xz: OK  gmp-6.2.1.tar.xz: OK  gperf-3.1.tar.gz: OK  grep-3.7.tar.xz: OK  groff-1.22.4.tar.gz: OK  grub-2.06.tar.xz: OK  gzip-1.10.tar.xz: OK  iana-etc-20210611.tar.gz: OK  inetutils-2.1.tar.xz: OK  intltool-0.51.0.tar.gz: OK  iproute2-5.13.0.tar.xz: OK  Jinja2-3.0.1.tar.gz: OK  kbd-2.4.0.tar.xz: OK  kmod-29.tar.xz: OK  less-590.tar.gz: OK  libcap-2.53.tar.xz: OK  libffi-3.4.2.tar.gz: OK  libpipeline-1.5.3.tar.gz: OK  libtool-2.4.6.tar.xz: OK  linux-5.13.12.tar.xz: OK  m4-1.4.19.tar.xz: OK  make-4.3.tar.gz: OK  man-db-2.9.4.tar.xz: FAILED  man-pages-5.13.tar.xz: OK  MarkupSafe-2.0.1.tar.gz: OK  meson-0.59.1.tar.gz: OK  mpc-1.2.1.tar.gz: OK  mpfr-4.1.0.tar.xz: OK  ncurses-6.2.tar.gz: FAILED  ninja-1.10.2.tar.gz: FAILED  openssl-1.1.1l.tar.gz: OK  patch-2.7.6.tar.xz: OK  perl-5.34.0.tar.xz: OK  pkg-config-0.29.2.tar.gz: OK  procps-ng-3.3.17.tar.xz: OK  psmisc-23.4.tar.xz: OK  Python-3.9.6.tar.xz: OK  python-3.9.6-docs-html.tar.bz2: OK  readline-8.1.tar.gz: OK  sed-4.8.tar.xz: OK  shadow-4.9.tar.xz: OK  systemd-249.tar.gz: OK  systemd-man-pages-249.tar.xz: OK  tar-1.34.tar.xz: OK  tcl8.6.11-src.tar.gz: FAILED  tcl8.6.11-html.tar.gz: OK  texinfo-6.8.tar.xz: OK  tzdata2021a.tar.gz: OK  util-linux-2.37.2.tar.xz: OK  vim-8.2.3337.tar.gz: OK  XML-Parser-2.46.tar.gz: OK  xz-5.2.5.tar.xz: OK  zlib-1.2.11.tar.xz: OK  zstd-1.5.0.tar.gz: OK  binutils-2.37-upstream_fix-1.patch: OK  bzip2-1.0.8-install_docs-1.patch: OK  coreutils-8.32-i18n-1.patch: OK  glibc-2.34-fhs-1.patch: OK  kbd-2.4.0-backspace-1.patch: OK  perl-5.34.0-upstream_fixes-1.patch: OK  systemd-249-upstream_fixes-1.patch: OK  md5sum: WARNING: 4 computed checksums did NOT match  /sources  

But I ran wget https://ftp.gnu.org/gnu/binutils/binutils-2.37.tar.xz --no-check-certificate

wget https://downloads.sourceforge.net/tcl/tcl8.6.11-src.tar.gz --no-check-certificate     wget https://github.com/ninja-build/ninja/archive/v1.10.2/ninja-1.10.2.tar.gz --no-check-certificate    wget https://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz --no-check-certificate  

But the problem still lasts. How can I resolve this? Thank you for all your answers and advices.

how to create multiple snd-vimidi devices

Posted: 29 Dec 2021 11:04 AM PST

According to How create a second midi device? n´one can create multiple virmidi devices, but that does not seem to work for me - according to aconnect -l I get exactly one:

client 14: 'Midi Through' [type=Kernel]      0 'Midi Through Port-0'    

This is the config (and the options) I've tried.

> cat /etc/modules-load.d/90-virmidi.conf  snd-virmidi  # check params:  > /usr/sbin/modinfo snd-virmidi    # configure the module  # attempt #1  > cat /etc/modprobe.d/90-virmidi.conf  options snd-virmidi enable=1,1 midi_devs=1,1  # attempt #2  > cat /etc/modprobe.d/90-virmidi.conf  options snd-virmidi index=0 enable=1 midi_devs=1  options snd-virmidi index=1 enable=1 midi_devs=1  # attempt #3  > cat /etc/modprobe.d/90-virmidi.conf  options snd-virmidi index=0,1 enable=1,1 midi_devs=2,2  # reboot  # check params:  > cat /sys/module/snd_virmidi/parameters/*  Y,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N  (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1  1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4  

A few things that I find confusing:

  • lsmod shows the module as "snd_virmidi", but the file is snd-virmidi.ko - I am not sure which speling needs to be used in the config
  • I have fou d not way to check from logs if the /etc/modprobe.d/90-virmidi.conf is used or not.

Any ideas what I am missing?

NVIDIA hdmi output not working

Posted: 29 Dec 2021 08:52 AM PST

I'm running Garuda linux on my desktop and my computer has 2 HDMI ports and one of those comes from the NVIDIA 2070 super. The regular HDMI works all the time with no issues but the nvidia one just seems to stop working with no errors or anything.

If the cable is plugged in on boot it will work if I'm in BIOS but after that the screen is frozen on the welcome to grub screen.

I'm guessing this is a problem with my nvidia drivers. How do I trouble shoot?

How do you tile a window in Awesome Window Manager?

Posted: 29 Dec 2021 09:06 AM PST

I'm apparently missing some knowledge that is very fundamental about Awesome Window Manager.

I'm using the default configuration that comes with Debian 11 and for the past two weeks I've been using the default floating layout.

Now, I'm ready to venture into utilizing its tiling features, but toggling the top-left layout button has no affect on the layout of my windows. Even when I close all windows, and launch them from scratch, they do not launch into tiles no matter what layout I choose (beforehand) via that layout-toggler-button.

I've watched videos of other people doing this, but (for me) the windows never tile. What I'm I missing here?

What is the best Linux distribution for high resolution screens? [closed]

Posted: 29 Dec 2021 08:36 AM PST

What is the best Linux distribution for high resolution screens?

Grouping the files by month and archeiving it in bash

Posted: 29 Dec 2021 09:25 AM PST

I have a bunch of files created on different months in my directory.I want to filter out the files created on a certain month and archeive those files using tar functionality. So far the code i have tried is

months="Dec-2021"  decfiles=find . -newermt "01-$months -1 sec" -and -not -newermt "01-$months +1 month-1 sec | tar cz decemberfiles.tar.gz"  echo $decfiles              

This above code throws me the error like

files.sh: 3: .: Illegal option -n  tar: Refusing to write archive contents to terminal (missing -f option?)  tar: Error is not recoverable: exiting now  

I cant seem to figure this out and am a newbie in bash as well. Any help to figure this out would be highly appreciated.

Video glitches when files are played in fullscreen

Posted: 29 Dec 2021 08:51 AM PST

When trying to play videos like movies with the Kodi media center the videos often have lots of glitches. I tried it with the VLC player, MPV and Dragonplayer on Debian11/KDE and it occurs with all of these.

  • it does not occur with all files, only some

  • when recording it with screenrecorder the recorded video doesn't have these glitches

  • it does not occur when playing the file in the window mode of the media player...even if the image is as large as the fullscreen one (only parts of the two black bars at the top and bottom are not shown when playing it windowed instead of fullscreen)

  • It is worst with MPV and Dragonplayer has least of these glitches (all at fullscreen)

  • VLC is a bit better with these glitches than MPV (only sometimes but I changed the default player in Kodi due to this). Strangely, a test video just played without glitches at fullscreen which still show in MPV and showed in VLC earlier. Now the video in VLC is too dark even though I haven't changed the config and it didn't look this way when I played the same video in VLC earlier. It does not make a difference if I use firejail vlc or vlc to launch the video. I also just tried Dragonplayer and no glitches are shown there currently but it's too bright.

With glitches I'm referring to "cuts" or "lines" where it looks like there are basically parts of old video in next frames, as I can't record it I could try taking a picture of it but don't think how the glitches look like matter much.


Details:

First I thought it may be caused by some missing graphics drivers / graphics card or even codecs but as this occurs at fullscreen but not in the windowed mode (same video-image size) it appears to be caused by something else...probably my monitor or display-related things as I can't record it. It's a very strange but annoying problem (many video files are barely watchable due to this). Debian11 currently uses X11 v1.20.11.

There is no console output of MPV when these glitches are shown. It does display:

AO: [pulse] 48000Hz 5.1(side) 6ch float  VO: [gpu] 1920x1080 => 2592x1080 yuv420p  

The => 2592x1080 part is not displayed for other videos so it may be relevant.

I recently had to restart KDE Plasma so in another console window its output displayed during playing the video. It may no be relevant and is (removed basically duplicate lines):

libpng warning: iCCP: known incorrect sRGB profile  qt.svg: <input>:406:376: Could not add child element to parent element because the types are incorrect.  qt.qpa.xcb: QXcbConnection: XCB error: 2 (BadValue), sequence: 29557, resource id: 0, major code: 53 (CreatePixmap), minor code: 0  qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 29558, resource id: 35652120, major code: 55 (CreateGC), minor code: 0  qt.svg: <input>:406:376: Could not add child element to parent element because the types are incorrect.  qt.qpa.xcb: QXcbConnection: XCB error: 4 (BadPixmap), sequence: 29941, resource id: 35652124, major code: 54 (FreePixmap), minor code: 0  qt.qpa.xcb: QXcbConnection: XCB error: 13 (BadGC), sequence: 29942, resource id: 35652125, major code: 60 (FreeGC), minor code: 0  qt.svg: <input>:406:376: Could not add child element to parent element because the types are incorrect.    Exiting... (Quit)  qrc:/plasma/plasmoids/org.kde.plasma.volume/contents/ui/main.qml:494:39: QML StreamListItem: Binding loop detected for property "width"  

Any ideas and tips what to check or try are very much appreciated.

Disabling "Allow applications to block compositing" in Display Configuration -> Compositor seems to have helped. I will test further and it would be useful to find out why it was getting blocked (in fullscreen) and why that wasn't set as the default option.

Why do I have to statically link a c program if I want to use it as the init program for the kernel?

Posted: 29 Dec 2021 10:44 AM PST

I'm learning about how Linux works and for that I'm watching Tutorial: Building the Simplest Possible Linux System by Rob Landley. He basically goes through some steps to build a minimal system and around 20:00 he starts explaining about building a "hello world binary" that he will later use as the init program for the kernel to run as the very first program.

My question is, why do I have to statically link the hello.c application I want to use as the init application for the kernel to run after booting (as mentioned at 21:39 and seen at 23:05)?

How to fix apt update,upgrade

Posted: 29 Dec 2021 09:12 AM PST

Due to new installation an error was show that installation step failed Failed to fetch http://http.kali.org/kali/dists/kali-last-snapshot/inrelease Temporary resolving'http.kali.org'

vm "not a bootable disk" after upgrade from Promox 6.x to 7.x

Posted: 29 Dec 2021 09:29 AM PST

Today i decided to upgrade PVE from V6.2.4 to V7.1 I did it according to the following steps:

  1. First upgrade to the most recent 6.x version with apt-get update followed by apt-get upgrade-dist.
  2. I followed these steps https://pve.proxmox.com/wiki/Upgrade_from_6.x_to_7.0

During the upgrade i had some errors about "disk not found" where i was woried about but the upgrade just continued. (maybe they have a relation with the issues i now run into) After the upgrade finished, i restarted the host to complete the upgrade. The LXC containers where started (start on boot) without any issue. Some VM's (start on boot) also worked directly.

1640288957825.jpeg

Some of the VM's gave the error Boot failed: not a bootable disk in the console and keeps rebooting. After some Google attempts i found a post somewhere that it sometimes helps to reboot the host so i did it again and after that all the VM's gave the concerning error. I Googled for hours and found a lot of similar issues. The only thing that worked for the most of the VM's was restoring the backup. Unfortunatly this does not work for the most important machine, the mail server. It contains 170Gb on mails and the only backup i have a "proxmox backups" (images. 7x). None of them works as they all give the same issue.

The questions:

  1. How can i make the VM boot again? If its not fixable, is there a way to enter the disk so i can get the data?
  2. How did this occur? is it my fault? is it a bug? is it a know issue?
  3. I don't dare to reboot proxmox anymore as i'm scared that other VM's also break permanently. How can i be sure that this is not happening again? Or at least make sure the backup works!

Some important facts:

  • I'm 100% sure all the VM's worked find before the Proxmox upgrade
  • I created a backup of each machine to a network share (backup server) before i executed any update related command
  • The backups are made via the proxmox web interface
  • All the VM's run on Ubuntu 20.04 LTS incl. the mailserver
  • I tried to set the bios to UEFI (without succes)
  • I'm not a Proxmox Pro user so if extra data is required, please mention how i can get it to avoid unnecessary posts

The error:

1640291226399.png

pveversion -v output root@hv1:/home/axxmin# pveversion -v proxmox-ve: 7.1-1 (running kernel: 5.13.19-2-pve) pve-manager: 7.1-8 (running version: 7.1-8/5b267f33) pve-kernel-helper: 7.1-6 pve-kernel-5.13: 7.1-5 pve-kernel-5.4: 6.4-11 pve-kernel-5.3: 6.1-6 pve-kernel-5.13.19-2-pve: 5.13.19-4 pve-kernel-5.4.157-1-pve: 5.4.157-1 pve-kernel-5.4.41-1-pve: 5.4.41-1 pve-kernel-5.3.18-3-pve: 5.3.18-3 pve-kernel-5.3.18-2-pve: 5.3.18-2 ceph-fuse: 14.2.21-1 corosync: 3.1.5-pve2 criu: 3.15-1+pve-1 glusterfs-client: 9.2-1 ifupdown: residual config ifupdown2: 3.1.0-1+pmx3 ksm-control-daemon: 1.4-1 libjs-extjs: 7.0.0-1 libknet1: 1.22-pve2 libproxmox-acme-perl: 1.4.0 libproxmox-backup-qemu0: 1.2.0-1 libpve-access-control: 7.1-5 libpve-apiclient-perl: 3.2-1 libpve-common-perl: 7.0-14 libpve-guest-common-perl: 4.0-3 libpve-http-server-perl: 4.0-4 libpve-storage-perl: 7.0-15 libqb0: 1.0.5-1 libspice-server1: 0.14.3-2.1 lvm2: 2.03.11-2.1 lxc-pve: 4.0.11-1 lxcfs: 4.0.11-pve1 novnc-pve: 1.2.0-3 proxmox-backup-client: 2.1.2-1 proxmox-backup-file-restore: 2.1.2-1 proxmox-mini-journalreader: 1.3-1 proxmox-widget-toolkit: 3.4-4 pve-cluster: 7.1-2 pve-container: 4.1-3 pve-docs: 7.1-2 pve-edk2-firmware: 3.20210831-2 pve-firewall: 4.2-5 pve-firmware: 3.3-3 pve-ha-manager: 3.3-1 pve-i18n: 2.6-2 pve-qemu-kvm: 6.1.0-3 pve-xtermjs: 4.12.0-1 qemu-server: 7.1-4 smartmontools: 7.2-pve2 spiceterm: 3.2-2 swtpm: 0.7.0~rc1+2 vncterm: 1.7-1 zfsutils-linux: 2.1.1-pve3

Backup configuration from concerning backup:

balloon: 6144   boot: cdn   bootdisk: sata0   cores: 2   ide2: none,  media=cdrom   memory: 12288   name: axx-mcow-srv01   net0: virtio=4E:86:95:6A:FC:46,bridge=vmbr20,  firewall=1   numa: 0   onboot: 1  ostype: l26   sata0: vm_instances:vm-140-disk-0,size=200G   scsihw: virtio-scsi-pci   smbios1: uuid=a238b981-27dd-4ebd-acee-1a9ee97d66a1   sockets: 1   vmgenid: 971eb84d-7502-4a68-97af-66c595c011b9 #qmdump#map:sata0:drive-sata0:vm_instances:raw:  

The VM config

root@hv1:~# qm config 140  balloon: 6144  boot: cdn  bootdisk: sata0  cores: 2  ide2: none,media=cdrom  memory: 12288  name: axx-mcow-srv01  net0: virtio=4E:86:95:6A:FC:46,bridge=vmbr20,firewall=1  numa: 0  onboot: 1  ostype: l26  sata0: vm_instances:vm-140-disk-0,size=200G  scsihw: virtio-scsi-pci  smbios1: uuid=a238b981-27dd-4ebd-acee-1a9ee97d66a1  sockets: 1  vmgenid: 66102f99-158b-451b-a8e2-187ebed7b183  

UPDATE1

I found this https://forum.proxmox.com/threads/after-backup-boot-failed-not-a-bootable-disk.67954/ which makes sense to my understandings. As i don't have a separated backup of the partition table, i found a "boot-repair-disk" (https://help.ubuntu.com/community/Boot-Repair). This did not fix my VM but gave me some extra information what may be usefull.

enter image description here enter image description here


UPDATE2

After a boot with Gparted live, i can say that the partition table is gone. I tried to rebuild it with testdisk (https://interworks.com/blog/smatlock/2015/02/13/restore-damaged-or-corrupted-linux-partition-table/) but this is not working. enter image description here Is it possible to create an VM with exactly the same configuration (incl. disk size) and install ubuntu on it (same disk settings as we always use the default) and copy that partition table to the "broken" server ?

Webcam not recognized on Debian 11/sid

Posted: 29 Dec 2021 11:23 AM PST

My webcam is there, physically, but it is not recognized anywhere in my computer. The only place I see anything related to video is in # dmesg | grep video:

[   64.907469] videodev: Linux video capture interface: v2.00  [   64.921610] usbcore: registered new interface driver uvcvideo  [   72.665592] usbcore: deregistering interface driver uvcvideo  [   72.848476] videodev: Linux video capture interface: v2.00  [   72.857832] usbcore: registered new interface driver uvcvideo  

Some other possibly useful commands are lsusb:

Bus 003 Device 002: ID 093a:2533 Pixart Imaging, Inc. Gaming Mouse  Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub  Bus 001 Device 002: ID 1b3f:2008 Generalplus Technology Inc. USB Audio Device  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  

And lsmod | grep video

uvcvideo              114688  0  videobuf2_vmalloc      20480  1 uvcvideo  videobuf2_memops       20480  1 videobuf2_vmalloc  videobuf2_v4l2         36864  1 uvcvideo  videobuf2_common       65536  2 videobuf2_v4l2,uvcvideo  videodev              286720  3 videobuf2_v4l2,uvcvideo,videobuf2_common  mc                     61440  5 videodev,snd_usb_audio,videobuf2_v4l2,uvcvideo,videobuf2_common  usbcore               323584  6 xhci_hcd,snd_usb_audio,usbhid,snd_usbmidi_lib,uvcvideo,xhci_pci  usb_common             16384  3 xhci_hcd,usbcore,uvcvideo  video                  53248  1 asus_wmi  

ls /dev/video*:

zsh: no matches found: /dev/video*  

I know there is a similar question aleady on StackExchange but their solution does not work, my laptop does not have a webcam button.

My laptop is an ASUS TUF Gaming FX705DY running Linux 5.10.0-5-amd64 x86_64

Headphone jack not reliably detecting on Ubuntu 20.04

Posted: 29 Dec 2021 08:46 AM PST

The issue that I'm having is that headphones plugged into the 3.5mm jack on the front of my desktop computer are not always detected. I'm running Ubuntu 20.04 on a custom built computer with a B450 Tomahawk motherboard. I'm certain that the issue is with Ubuntu 20.04 because the issue was not occurring (as far as I'm aware) when the same computer was running 18.04.

The steps to create my problem are:

  1. Be running computer with headphones disconnected using another audio output.
  2. Simply plug headphones into computer but headphones don't appear in sound settings.
  3. By suspending and unsuspending the computer, the problem is usually fixed and headphones will now appear in sound settings.

Some things that I've tried:

Any help would be greatly appreciated!

How does id command on linux get user groups or which pam module is used?

Posted: 29 Dec 2021 09:01 AM PST

We have sssd configuration as follows:

id_provider = ad  auth_provider = krb5  access_provider = ldap  enumerate = false  ignore_group_members = true;  

As you can see, we are not enumerating users and groups and hence, getent passwd and getent group doesn't show the users and groups from ad.

Now, I want to understand how id -a <aduser> command shows the user and it's groups. I understand that it does realtime fetch for the given username or retrieve from sssd cache. But I want to know exactly what tells id command to fetch this info from sssd.

Some background info for my question:

I am trying to setup ldap authentication in our mysql 5.6 community server and for that I am using auth_pam.so which I copied from percona server of my local VM.

I have created a proxy user: ad_dba and mapped with ldap group: mysql_dba And I created the following pam service:

# cat /etc/pamd./mysqld  #%PAM-1.0  auth    include  password-auth audit  account include password-auth audit  

So, my auth_string is as follows: mysqld, ad_dba=mysql_dba

Now, I gave complete privileges to the proxy user: ad_dba

However, I can only authenticate with my ad usera but doesn't have any privileges. My understanding is that the group mapping doesn't work.

I am not sure how mysql checks user group members. I am trying to see if I can add a specific module in PAM just to retrive this group info.

EDIT-1:

I see from source code, that the mysql plugin is using built-in linux functions getgrouplist and getgrgid_r:

So, I must find a way to list my required groups and users in groups database or change the code and recompile. My question has become irrevalent now to this issue. But I am still eager to find out how id gets this info.

pip not working after installing another python version

Posted: 29 Dec 2021 10:00 AM PST

My CentOS 6.5 machine already had Python 2.6 installed in it. Now I just installed Python 2.7. But now, pip is not working. Whenever I run any pip command, it shows following error-

File "/usr/bin/pip", line 7, in <module>      from pip._internal import main    File "/usr/lib/python2.6/site-packages/pip/_internal/__init__.py", line 19, in <module>      from pip._vendor.urllib3.exceptions import DependencyWarning    File "/usr/lib/python2.6/site-packages/pip/_vendor/urllib3/__init__.py", line 8, in <module>      from .connectionpool import (    File "/usr/lib/python2.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 92      _blocking_errnos = {errno.EAGAIN, errno.EWOULDBLOCK}                                      ^  SyntaxError: invalid syntax  

I am not understanding what the actual problem is.

Get connected Wi-Fi network signal strength with nmcli

Posted: 29 Dec 2021 10:12 AM PST

I'm able to get the signal strength of all Wi-Fi networks with the following command:

$ nmcli -t -f SIGNAL device wifi list  $ 77    67    60    59    55    45    44    39    39    37  

I would like to reduce this list only to the current Wi-Fi on which I'm connected. I've been through the man page but can't find the necessary flag.

One solution would be to use sed or awk, but I would like to avoid piping.

Should I use nmcli device wifi instead of parsing directly for the SIGNAL column?

Best Practice: How to maintain/rotate log files (from redirected output)

Posted: 29 Dec 2021 11:05 AM PST

I read several question for the mentioned topic, but I'm not sure if they really answer the question for my problem.

I have an application running and I redirect the output to a log file, i.e.,

nohup ./start.sh ./config/s.properties >./logs/app.log 2>&1 &

The file is now 80GB in size and I would like to delete it. Most of the answers here suggest not to delete it, because the data will still be written to the "deleted" file. Answers suggest to use logrotate instead, but I'm wondering if logrotate works with redirected output?

If it does work, what would the configuration look like? Do I need any postrotate command? I should mention that it is impossible for me to stop and restart the running application, thus I would just like to "steal" the file and let the running application write to a new one.

If logrotate is not the solution, what should I do - again I cannot stop and restart the running application - so that I can reduce the file-size?

Thanks for any help!

PS: Just to mention the application is running on a Debian8 64 OS

How to fix apt-get install / update not working on my Kali Linux [closed]

Posted: 29 Dec 2021 08:42 AM PST

I'm using Kali Linux but the apt-get install command is not working to install any application on my system. Mustafa1112221 I think it's got something to do with my Kali Linux repository sources.list file. The file may be empty or the current repo address is wrong or experiencing a problem.

Please, could someone provide me a link to the Kali official sources.list file?

Fail2ban - send email with msmtp

Posted: 29 Dec 2021 09:30 AM PST

How do I set up fail2ban to send emails using msmtp?

I tried changing the mta = sendmail line to mta = msmtp and the action = %(action_)s line to action = %(action_mwl)s.

I think /etc/fail2ban/action.d/msmtp-whois-lines.conf file, but I'm not sure what to put in it.

I can normally send mail from the command line with echo -e "Subject: subject\nMessage contents" | msmtp recipient@hotmail.com without a password.

How can I prevent 'grep' from showing up in ps results?

Posted: 29 Dec 2021 11:05 AM PST

When I search for some process that doesn't exist, e.g.

$ ps aux | grep fnord                            wayne    15745  0.0  0.0  13580   928 pts/6    S+   03:58   0:00 grep fnord  

Obviously I don't care about grep - that makes as much sense as searching for the ps process!

How can I prevent grep from showing up in the results?

What is word splitting? Why is it important in shell programming?

Posted: 29 Dec 2021 10:49 AM PST

I'm getting confused about the role word splitting plays in zsh. I have not been exposed to this concept when programming in C, Python or MATLAB, and this has triggered my interest of why word splitting seems to be something specific to shell programming.

I have read about word splitting on this and other sites before, but haven't found a clear explanation of the concept. Wikipedia has a definition of word splitting but does not seem to have references on how it applies to Unix shells.

Here's an example of my confusion in zsh:

In the Z Shell FAQ, I read the following:

3.1: Why does $var where var="foo bar" not do what I expect?

In most Bourne-shell derivatives, multiple-word variables such as var="foo bar" are split into words when passed to a command or used in a for foo in $var loop. By default, zsh does not have that behaviour: the variable remains intact. (This is not a bug! See below.) The option SH_WORD_SPLIT exists to provide compatibility.

However, in the Z Shell Manual, I read the following:

SH_WORD_SPLIT (-y) <K> <S>

Causes field splitting to be performed on unquoted parameter expansions. Note that this option has nothing to do with word splitting. (See Parameter Expansion.)

Why does it say that SH_WORD_SPLIT has nothing to do with word splitting? Isn't word splitting precisely what this is all about?

No comments:

Post a Comment