Wednesday, June 29, 2022

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


RDP client for Linux/Unix with remoteApp support

Posted: 29 Jun 2022 08:13 PM PDT

Is there a RDP client that is capable of working with published remote apps. Analogously to what MS Remote desktop for macOS is doing?

The goal, when the program is launched, is to show the user the applications published for them. No downloading of rdp files etc. Remmina seems to be most recommended but it is just incapable of this. freerdp supports remoteapp but there still seems to be missing a gui. The whole idea is about just asking the server about published apps. Is this not possible because there is no documentation or why is there simply no usable rdp client for linux/unix? I am willing to use a paid software.

disk quota exceeded but there is space

Posted: 29 Jun 2022 08:07 PM PDT

I am getting erro 'disk quota exceeded' but the partition is not full and user has unlimited quota. What is wrong and how can I fix it?

I am using Putty on Windows to access a Ubuntu 20.04 VPS with Webmin 1.994 and Usermin 1.840.

minhascarteiras@mc:/tmp$ pyenv install 3.7.6

/home/minhascarteiras/.pyenv/plugins/python-build/bin/python-build: line 2048: cannot create temp file for here-document: Disk quota exceeded  mkdir: cannot create directory '/tmp/python-build.20220629235336.143991': Disk quota exceeded    BUILD FAILED (Ubuntu 20.04 using python-build 20180424)    Inspect or clean up the working tree at /tmp/python-build.20220629235336.143991  

minhascarteiras@mc:/tmp$ df -h

Filesystem      Size  Used Avail Use% Mounted on  udev            445M     0  445M   0% /dev  tmpfs            98M 1016K   97M   2% /run  /dev/sda         19G   11G  7.5G  58% /  tmpfs           489M     0  489M   0% /dev/shm  tmpfs           5.0M     0  5.0M   0% /run/lock  tmpfs           489M     0  489M   0% /sys/fs/cgroup  /dev/sdc        4.8G   20M  4.7G   1% /baks  tmpfs            98M     0   98M   0% /run/user/0  

minhascarteiras@mc:/tmp$ quota -u

Disk quotas for user minhascarteiras (uid 1000): none  

How to examine `elf` file by hexdump?

Posted: 29 Jun 2022 07:44 PM PDT

I'm learning elf file layout, so I'm reading Executable_and_Linkable_Format.

In the beginning, I used readelf -a to exmine elf(.o file), but it provided is not my want, so I used hexdump -C to exmined it binaries form.

I used as -Og -g ... -o ..., ld ... -o ... and hexdump -C ... to examine elf file, below is my code.

.section .data  iary:      .int 1, 2  lary:      .long 3, 4    .section .text  .globl  _start    _start:      movq $0, %rdi      leaq iary(, %rdi, 4), %rbx      movl iary(, %rdi, 4), %ecx        movq $1, %rdi      leaq iary(, %rdi, 4), %rbx      movl iary(, %rdi, 4), %ecx        #===============================            movq $0, %rdi      leaq lary(, %rdi, 4), %rbx      movl lary(, %rdi, 4), %ecx        movq $1, %rdi      leaq lary(, %rdi, 4), %rbx      movl lary(, %rdi, 4), %ecx        movq $60, %rax      syscall  

I'm looking for program header, section header, .etc. But I'm not sure my search method is correct! enter image description here

Please connect with above picture. enter image description here

notice: objdump -x can display all headers, but I guess it maybe analyses binary file then displays something we want. So I try to understand the binary file format!

Firewalld Internal zone Rejected

Posted: 29 Jun 2022 07:37 PM PDT

I'm trying a simple firewalld setup on ubuntu/jammy64 as follows with

Source (K1) ------ (fw int) | Firewall (FW1) | (fw ext) ------ Destination (K2)    
┌──(vagrant㉿k1)-[~]  └─$ ip -4 a show eth1  3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000      inet 172.16.10.51/24 brd 172.16.10.255 scope global eth1         valid_lft forever preferred_lft forever  ┌──(vagrant㉿k1)-[~]  └─$ ip r  default via 10.0.2.2 dev eth0  10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15  172.16.10.0/24 dev eth1 proto kernel scope link src 172.16.10.51  172.16.20.0/24 via 172.16.10.10 dev eth1  ----------    vagrant@firewall:~$ ip -4 a show enp0s8  3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000      inet 172.16.10.10/24 brd 172.16.10.255 scope global enp0s8         valid_lft forever preferred_lft forever  vagrant@firewall:~$ ip -4 a show enp0s9  4: enp0s9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000      inet 172.16.20.10/24 brd 172.16.20.255 scope global enp0s9         valid_lft forever preferred_lft forever    vagrant@firewall:~$ sysctl net.ipv4.ip_forward  net.ipv4.ip_forward = 1  ----------  ┌──(vagrant㉿k2)-[~]  └─$  ip -4 a show eth1  3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000      inet 172.16.20.51/24 brd 172.16.20.255 scope global eth1         valid_lft forever preferred_lft forever  ┌──(vagrant㉿k2)-[~]  └─$ ip r  default via 10.0.2.2 dev eth0  10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15  172.16.10.0/24 via 172.16.20.10 dev eth1  172.16.20.0/24 dev eth1 proto kernel scope link src 172.16.20.51  

I tried various combinations of adding interfaces, and source addresses to the Internal zone and even with a rich rule allowing traffic, k1 can't connect to k2, and the debug log shows a reject message.

vagrant@firewall:~$ sudo firewall-cmd --list-all  --zone=internal  internal (active)    target: default    icmp-block-inversion: no    interfaces: enp0s8    sources: 172.16.10.51/32    services: ssh    ports:    protocols:    forward: yes    masquerade: no    forward-ports:    source-ports:    icmp-blocks:    rich rules:      rule protocol value="icmp" accept      rule family="ipv4" source address="172.16.10.0/24" port port="5201" protocol="tcp" log prefix="iperf" level="debug" accept  
Jun 30 02:18:13 firewall kernel: "filter_FWD_internal_REJECT: "IN=enp0s8 OUT=enp0s9 MAC=08:00:27:d0:db:54:08:00:27:35:72:b5:08:00 SRC=172.16.10.51 DST=172.16.20.51 LEN=60 TOS=0x10 PREC=0x00 TTL=63 ID=2173 DF PROTO=TCP SPT=43642 DPT=5201 WINDOW=64240 RES=0x00 SYN URGP=0  

When I add both interfaces to the Internal zone connectivity works fine but not when one of the interfaces is not part of the zone.

Could someone share pointers on where to look next?

Thank you.

difference between perf v.s. gperftools(with pprof)

Posted: 29 Jun 2022 07:29 PM PDT

my project needs performance analysis, just come to perf and gperftools(with pprof), my question is what differences between them, and in which scenarios i shoud use which one?

thnk for any advice

Subprocess launched inside a chroot created on a codespace with debootstrap fail with /dev/fd/62: No such file or directory

Posted: 29 Jun 2022 07:21 PM PDT

My goal is to standup a chroot with the basic Unix tool-set (bash, cp, touch, cat, etc) and any necessary dependencies need to run apt get inside a codespace. Using debootstrap gets me close. The basic tools are installed and I can run apt get. The problem is subprocess do not work. I expect the last line to print "test" but actually I get an error saying that the subprocess' file handle is no good. I would have thought the vanilla debootstrap environment would be sufficiently cooked so that subprocess work, but that does not seem to be the case. Is there a switch I can pass?

$ sudo apt-get install -y binutils debootstrap  $ cd /home/codespace  $ CHROOT=/home/codespace/chroot  $ mkdir -p "${CHROOT}"  $ sudo debootstrap stable "${CHROOT}" http://deb.debian.org/debian/  $ sudo chroot "${CHROOT}"  $ cat < <(echo test)  bash: /dev/fd/63: No such file or directory  

To reproduce,

  • sign up for codespaces beta here.
  • fire up a codespace for this project, open a bash shell (ctrl+`).
  • run the above.

This also reproduces outside of codespace so any Ubuntu environment will probably yield similar results.

print or miss string based on the result of simple math between fields of current and previous lines with awk

Posted: 29 Jun 2022 07:24 PM PDT

1529.89 1.05    22.36   48.78   33.8  1529.91 2.05    22.36   52.79   36.93  1529.92 3.06    22.36   52.80   36.93  1529.92 4.25    22.36   52.79   36.94  1529.92 5.10    22.36   52.79   36.94  1529.93 5.24    22.36   52.80   36.94  1529.94 6.05    22.36   52.80   36.94  1529.95 6.27    22.36   52.80   36.94  1529.95 7.01    22.36   52.80   36.94  1529.96 7.26    22.36   52.80   36.94  1529.97 8.11    22.36   52.80   36.94  1529.99 9.22    22.35   52.80   36.94  1530.00 10.12   22.36   52.80   36.94  1530.02 11.26   22.36   52.80   36.94  1530.03 12.18   22.36   52.80   36.94  1530.04 13.12   22.36   52.81   36.94  1530.06 14.04   22.36   52.81   36.95  1530.10 16.21   22.36   52.81   36.94  1530.11 17.17   22.35   52.80   36.94  1530.12 18.09   22.35   52.81   36.94  1530.14 19.19   22.35   52.81   36.94  1530.15 20.19   22.35   52.80   36.94  1530.17 21.24   22.35   52.81   36.94  1530.18 22.05   22.35   52.81   36.95  1530.20 23.14   22.35   52.81   36.95  1530.21 24.14   22.35   52.81   36.94  1530.23 25.23   22.35   52.80   36.94  1530.23 26.03   22.35   52.80   36.94  1530.23 26.24   22.34   52.80   36.94  1530.26 27.10   22.35   52.81   36.95  

I've got that type of csv file. What I need is to print every line of it if whole number in its second field is not equal to the same number in second field of previous line so on below two lines for an example:

1529.94 6.05    22.36   52.80   36.94  1529.95 6.27    22.36   52.80   36.94  

... I would like to print only first line and skip that second line. Second field numbers increasing up to ~1300 and decreasing to 1 after.

I tried awk using substr() function but it does not seem to be working as I just got stuck:

awk -F. '{for (i=NR;i<3814;i++) {i=1 n=(substr($2,4))}{i=i+1 v=(substr($2,4))} {if ((n+v)%2=1) print $0} {i++}}' test.csv  

Ethernet not working after hardware upgrade

Posted: 29 Jun 2022 05:46 PM PDT

I've recently upgraded my mobo & CPU (Asus Prime B560M-A + i3) in my Ubuntu 20.04 machine. Everything works well, except the network connection. The mobo is equipped with an Intel I219 chip, which is apparently served by the e1000e driver (a kernel driver now - not sure if it's present in my kernel though).

During boot, I get a 'Failed to start Raise network interfaces' error. I have tried removing the eth0 line in /etc/udev/rules.d/70-persistent-net.rules and rebooting, but no joy. ifconfig -a only has the lo and vpn adapters listed. I suspect maybe a driver issue? Not sure.

I tried using a USB network adapter to get around the issue temporarily to try installing the HWE kernel, but that isn't working either. It does show up in ifconfig -a, but no packets transmitted, etc.

Any help greatly appreciated.

Enable networkmanager after Arch installation

Posted: 29 Jun 2022 05:04 PM PDT

I'm new to arch and am trying to enable the networkmanager. I'm using a laptop without a ethernet port therefor trying to connect wirlessly. I looked on the wiki and seem to be stuck.

I've just installed arch manually, rebooted and realised I couldn't install any packages. I used ping -c 5 8.8.8.8 to check if it was network connection and received Network is unreachable.

I've checked the driver status with lspci -k driver status

I've used dmesg | grep usbcore . When I use ip link , it only has the loopback lo: ip link output

I've tried iw dev but it doesn't recognise the command.

Does anyone have any suggestions?

HELP -- errors generated, when I, from /etc "source tmux.conf". How do I repair these errors? Which is right mode-mouse/mouse-mode

Posted: 29 Jun 2022 08:01 PM PDT

root@abyss/home # source tmux.conf   set-window-option: command not found  tmux.conf (line 2):  set-window-option -g automatic-rename on  ^  from sourcing file tmux.conf   set-option: command not found  tmux.conf (line 3):  set-option -g set-titles on  ^  from sourcing file tmux.conf   unbind: command not found  tmux.conf (line 6):  unbind C-b  ^  

"Invalid system disk" after "There are differences between boot sector and its backup"

Posted: 29 Jun 2022 03:39 PM PDT

I created a live LMDE5 system on a USB pen drive using Rufus and everything was working fine except for a large number of warnings and critical error messages I got from dmesg. There where some security warnings regarding a CPU vulnerability and many ACPI-related errors which appear to be related to some toxic Microsoft hardware driver politics. But among them, there was also a message

There are differences between boot sector and its backup.  This is mostly harmless. Differences: (offset:original/backup)  <...long list of entries...>  1) Copy original to backup  2) Copy backup to original  3) No action  

with roughly 30-40 lines of entries. If I remember correctly, Linux systems create a working boot sector at the beginning of a disk as well as a backup copy at the end of the disk. After reading the few discussions I could find on this somewhat elusive error, I decided to choose the option of replacing the original with its backup.

Unfortunately, this appears to have been a grave mistake as I'm now getting a

Invalid system disk. Replace disk and strike any key  

and the system won't boot. Question:

  • What exactly causes such a high number of offsets within the boot sector, especially on a virtually plain-vanilla installation, and what would have been the correct action?
  • How can it possibly be, if not for a serious bug, that restoring a proper, system-generated backup - following a system message asserting This is mostly harmless - bricks the system?
  • Most importantly: How to solve this issue so the system will boot again?

Note: I did not get any error referring to a "dirty bit" that appears to get set when a drive is not properly unmounted as discussed here. Also, the USB drive itself is virtually new.

Using two event codes PMU events with perf

Posted: 29 Jun 2022 03:09 PM PDT

How to combine multiple event codes for PMU events in perf?

E.g., the following event has two event codes:

...  {      "EventCode": "0x2A,0x2B",      "UMask": "0x01",      "EventName": "OCR.DEMAND_DATA_RD.ANY_RESPONSE",      ...    },  ...  

man perf-list says it should be something like this:

perf stat -e cpu/event=0xb3,umask=0x01/ -- sleep 1  

But, the event field only supports values between 0-255. Is there a way to combine them when using with perf?

Seemingly random performance drops on Pop!_OS

Posted: 29 Jun 2022 06:07 PM PDT

I am sure many PC users have experienced slow downs on their computers over time (mine is about a year old), but this scenario I find strange.

The Problem

At about 5:30PM yesterday I was browsing the web and running commands (mainly trying to change my background in a shell script). I had a few different web pages open when I noticed huge amounts of lag. I tried closing all windows and nothing changed. I could tell by moving my mouse across the screen that it would freeze for a small period of time every second. I assumed a restart would handle it, but the lag persisted.

The next day I started my PC and everything seemed normal, but after opening a few windows the lag started again. I noticed it started and stopped randomly, sometimes happening right when I booted and it would even go away sometimes. This is when I started to try and find the problem.

Possible causes

  1. The last thing I can remember doing before the lag is running # gsettings set org.gnome.desktop.background picture-uri file:///home/jonas/Pictures/dark-wallpaper.jpeg. This command did not work (I was trying to change the background).
  2. A bit earlier I tried to install banshee by adding the repository # sudo add-apt-repository ppa:banshee-team/ppa. This threw an error so I removed the repository with the -r option. I also tried to install 'lyrebird' with # sudo dpkg -i lyrebird_1.1.0-3.deb which I had downloaded from Github. Both attempts were unsuccessful.

What I've tried

  1. Run clamscan on my home directory folder (0 viruses detected)
  2. Check system monitor for possible resource intensive programs. I compared a screenshot of it when lag wasn't happening and when it was, there were no differences.

I doubt anyone will be able to give me an exact cause, but even just a suggestion on how to find the problem will mean a lot.

why is the internal storage mmc and not sd?

Posted: 29 Jun 2022 02:47 PM PDT

I've been researching the difference bewteen sd and mmc after noticing that openwrt (and other distributions) name the internal storage that contains the system as mmcblk and other disks that live in external sd card readers as sd.

The thing that is confusing me is that the internal memory is also an sd card. So why does the system say that it is mmc? Is it because the reader is an mmc reader or is it some kind of emulation to make it compatible with the rest of the system?

IP address string manipulation problem

Posted: 29 Jun 2022 02:52 PM PDT

I am trying to build three octets 10.AB.C9 from a 5 digit number: 12ABC 12 = first octet AB = Second octet C = Third octet

There are two scenarios with my existing code that can cause an in correct IP to generate. If C has a leading zero for example: 02 then the third octet will 027 and IPs can't have hardcoded leading zeros.

five_digits=12620    if [ "${five_digits:4:1}" -eq 0 ]; then    ip_main="10.${five_digits:2:2}.9"    gateway_ip_prefix="10.${five_digits:2:2}.2"    elif [ "${five_digits:4:1}" -ne 0 ]; then        ip_main="10.${five_digits:2:2}.${five_digits:4:1}9"    gateway_ip_prefix="10.${five_digits:2:2}.${five_digits:4:1}2"  

The above code solves the leading zero problem in C

The second scenario is where A is zero meaning the second octet will have a leading zero. I am not sure how to handle that scenario and hopefully make the script simpler.

How to check the rules on iptables

Posted: 29 Jun 2022 03:37 PM PDT

I am new to the iptables completely. I wrote two rules :

1-iptables -A OUTPUT -p tcp – dport80  -j DROP.  2-iptables -A INPUT -i eth0 -j ACCEPT .  

I want to test or check them and I do not know how ?

Also, I am wondering about the meaning of some rules :

1-iptables -A INPUT -s 192.168.0.4 -m mac --mac-source 00:50:8D:FD:E6:32 -j ACCEPT  2-iptables -A INPUT -s 192.168.0.0/24 -j ACCEPT .   3-iptables -A INPUT -s 192.168.0.0/255.255.255.0 -j ACCEPT.  4-iptables -A INPUT -p tcp --dport 6881:6890 -j ACCEPT.  

Thanks,

Cancel a cron job that runs the script when there is an error in the same script

Posted: 29 Jun 2022 03:20 PM PDT

I have a script running every 5 minutes by cron. In the script itself, I want to add that if I encouter XYZ error, stop the cron job permanently and exit the script. Currently if I just put an exit 1 in the script, when the error occurs, the cron will restart the script and the loop continues.

Old Linux rejects my ssh id_rsa key from newly installed windows

Posted: 29 Jun 2022 06:27 PM PDT

I have been maintaining an old Linux server (CentOS 6.5) for long term. I access that Linux server by ssh with 'pub key auth'.

Now I just bought a new Windows (win10 or 11 not sure) laptop and installed 'Git for win 2.33', when I try to ssh from the new lap top as usual, I got:

$  ssh -i ~/.ssh/id_rsa.bridge_to_home -p 5122  -vv shaozr@{ip addr}    OpenSSH_8.8p1, OpenSSL 1.1.1m  14 Dec 2021    debug1: Reading configuration data /etc/ssh/ssh_config    debug2: resolve_canonicalize: hostname 27.115.62.170 is address    debug1: Connecting to 27.115.62.170 [27.115.62.170] port 5122.    debug1: Connection established.    debug1: identity file /c/Users/43141/.ssh/id_rsa.bridge_to_home type -1    debug1: identity file /c/Users/43141/.ssh/id_rsa.bridge_to_home-cert type -1    debug1: Local version string SSH-2.0-OpenSSH_8.8    debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3    debug1: compat_banner: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000002    debug2: fd 4 setting O_NONBLOCK    debug1: Authenticating to 27.115.62.170:5122 as 'shaozr'    debug1: load_hostkeys: fopen /c/Users/43141/.ssh/known_hosts: No such file or directory    debug1: load_hostkeys: fopen /c/Users/43141/.ssh/known_hosts2: No such file or directory    debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory    debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory    debug1: SSH2_MSG_KEXINIT sent    debug1: SSH2_MSG_KEXINIT received    debug2: local client KEXINIT proposal    debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c    debug2: host key algorithms: ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256    debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,aes256-cbc,aes192-cbc    debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,aes256-cbc,aes192-cbc    debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1    debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1    debug2: compression ctos: none,zlib@openssh.com,zlib    debug2: compression stoc: none,zlib@openssh.com,zlib    debug2: languages ctos:    debug2: languages stoc:    debug2: first_kex_follows 0    debug2: reserved 0    debug2: peer server KEXINIT proposal    debug2: KEX algorithms: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1    debug2: host key algorithms: ssh-rsa,ssh-dss    debug2: ciphers ctos: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se    debug2: ciphers stoc: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se    debug2: MACs ctos: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96    debug2: MACs stoc: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96    debug2: compression ctos: none,zlib@openssh.com    debug2: compression stoc: none,zlib@openssh.com    debug2: languages ctos:    debug2: languages stoc:    debug2: first_kex_follows 0    debug2: reserved 0    debug1: kex: algorithm: diffie-hellman-group-exchange-sha256    debug1: kex: host key algorithm: (no match)    Unable to negotiate with 27.115.62.170 port 5122: no matching host key type found. Their offer: ssh-rsa,ssh-dss  

This is weird.

I can still ssh to that linux from my old PC, and I can git clone via ssh (to famous git repo provider) from my new laptop.

It seems that both sides are 'ssh OK', but why the CentOS6.6 rejects my id_ras key from 'Git for win 2.33' ?

How to open 'About Mozilla Firefox' (update) window with one command

Posted: 29 Jun 2022 06:49 PM PDT

For some reason I have ended up using the 'local' (portable) version of Firefox, and it can check for updates from its dedicated window (Help - About...).

enter image description here

Can that window be opened with one command?

How to get list of Linux capabilities

Posted: 29 Jun 2022 08:11 PM PDT

I need to get a list of capabilities available to the version of linux on which the program is executed. Just in order to give user possibility to choose what capability to grant to the file. Is there any chance to do this using some standard libraries? The only way I managed to do this is to look at the bounding set of cash --print, but

  1. Somewhy it displayes ...,cap_audit_read,38,39, while /usr/include/linux/capability.h says that CAP_LAST_CAP is CAP_AUDIT_READ(37)
  2. I would really use some descriptions to capabilities, if it is possible

Touchpad (ELAN 04F3:3072) not working/detected after BIOS upgrade (Lenovo Ideapad Flex 3 11ADA05)

Posted: 29 Jun 2022 03:08 PM PDT

Reposting this from ArchLinux BBS, because I suspect that it isn't distribution specific.

After a BIOS update from FPCN18WW (2021-07-12) to FPCN24WW (2021-08-19) my touchpad is not recognized in the following distributions:

  • (home) Archlinux 5.14.8 (and mainline kernel)
  • (live) Ubuntu 21.04

The touchpad works in Windows and in the BIOS setup menu. The changelog of the new BIOS firmware is: ... Fix win11 TPM 2.0 UEFI Preboot Interface Test fail issue. Optimize Boot Menu UI. ...

I know the touchpad is not anymore recognized because of the following missing entries in dmesg:

Sep 19 17:21:49 kallisto kernel: pcie_mp2_amd 0000:03:00.7: enabling device (0000 -> 0002)  Sep 19 17:21:49 kallisto kernel: mc: Linux media interface: v0.10  Sep 19 17:21:49 kallisto kernel: hid-generic 0020:1022:0001.0002: hidraw1: <UNKNOWN> HID v0.00 Device [hid-amdtp 1022:0001] on  Sep 19 17:21:49 kallisto kernel: input: MSFT0001:00 04F3:3072 Mouse as /devices/platform/AMDI0010:01/i2c-1/i2c-MSFT0001:00/0018:04F3:3072.0003/input/input9  Sep 19 17:21:49 kallisto kernel: input: MSFT0001:00 04F3:3072 Touchpad as /devices/platform/AMDI0010:01/i2c-1/i2c-MSFT0001:00/0018:04F3:3072.0003/input/input11  Sep 19 17:21:49 kallisto kernel: hid-generic 0018:04F3:3072.0003: input,hidraw2: I2C HID v1.00 Mouse [MSFT0001:00 04F3:3072] on i2c-MSFT0001:00  

My BIOS settings remain unchanged: Secure Boot is disabled and the AMD PSP is enabled. I've already contacted Lenovo support, but (as I can fully understand), they are not reading my texts correctly and think the device is broken. Since a touchpad on a laptop is a nice feature, I decided to try continue troubleshooting on my own, though I'm now at a dead end.

Just today I found out that some I2C device is added under /sys/devices/platform/AMDI0010:01/i2c-1/device/MSFT0001:00, which seems to be my touchpad, maybe.

Quick note: All the other touchpad troubleshooting hints were tried before. I've read through the main article about this issue, but as the touchpad is different, all suggested solutions failed.

Is there any way I can troubleshoot and maybe resolve this issue?

Touchpad and mouse problems on Zorin OS 16

Posted: 29 Jun 2022 07:47 PM PDT

I had problems that originated in Windows 10, where an update was installed without my permission.  After it was done, my Dell touchpad would not function correctly (could click on some things but not others) and my mouse plugin would exit out of folders/webpages with the left click while sometimes still working as normal.

Now I thought this problem would be fixed by removing Windows entirely and installing Linux, but I guess that is not the case.

Is it possible using an external hard drive to run Pop! Os with 200gb allocated, and the rest allocated to windows as a normal external drive?

Posted: 29 Jun 2022 06:03 PM PDT

I've been wanting to run Pop! Os from an external hard drive, but I also want to be able to use the rest as a normal usb drive. Is this possible to do? If so, how?

Bash: Regex for comparing file path

Posted: 29 Jun 2022 03:52 PM PDT

I want to check if an input string matches whitelisted file paths, then only I want to perform some operation.

I am doing something like this

path1="mydir/**"  path2="mydir/testing"    [ [ "$path2" =~ "$path1" ] ] && echo "Matches"  

Where, if paths are like

mydir/test/dir  mydir/othertest/dir  

These should pass.

Above check is giving me an error

assets/bin/copymain: line 8: [: too many arguments  

Modify grub to dual boot fedora with windows 10

Posted: 29 Jun 2022 04:08 PM PDT

I am trying to dual boot fedora with windows 10. I am new to linux. I have found this code to be written in 40_custom file in grub.

menuentry "Windows 10" {   set root='(hd0,1)'   chainloader +1   }   

But this does not seem to work. It says cannot find disk. I have my windows in /dev/sda3 What should I write in 40_custom file so that i can use dual boot properly?

EDIT: My laptop had windows 10 pre installed when I had bought it. I have installed fedora 29 workstation. I do see the grub screen but the windows 10 option there(Created due to the above code) tells disk not found. Windows boot entry was not created automatically when I had installed fedora

When uname reports aarch64 instead of arm64v8. Willl docker-ce still pull arm64v8 images

Posted: 29 Jun 2022 05:03 PM PDT

docker-ce now supports multiple architecture base images but looks for the tag arm64v8 instead of aarch64 (which is labelled as deprecated).

Unfortunately my new ubuntu 18.04 host os uname reports aarch64.
Linux nas 4.4.154-1122-rockchip-ayufan-g7859b9b904a9 #1 SMP Mon Oct 1 07:32:42 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux

So

  1. Can one manually add/change the architecture tag in a already operational host? or
  2. Will docker-ce pull the arm64v8 image even if the host os reports aarch64?

How to use Jailkit Jail Manager in Virtualmin to restrict users

Posted: 29 Jun 2022 03:04 PM PDT

How to use Jailkit Jail Manager in Virtualmin (Webmin 1.892) to restrict users in their homes including virtual website and all services running under user?

I am setting up small website hosting service and I must disable access to everything except user's home.

I dont want to use FTP or FTPS! User's will have full SSH access to their system and they will be able to run for example NodeJS scripts, Teamspeak, etc...

Is it possible? If yes, is it possible in Virtualmin or it needs more and deeper setup.

EDIT: I am using Debian 9

How do I find the ultimate CA cert in a 'valid' certificate

Posted: 29 Jun 2022 08:10 PM PDT

So I look after 2 web servers, one old, one new. The old one uses our old url, the new, our new url, both are internally signed.

The HTTPS certificate is about to expire on the old one, so I've checked and even though it has 1 month left on it, it's identifying as not valid, due to it's certificate authority, which is an internal machine.
However, the new server, which has a similarly internally signed certificate is showing as valid, albeit it is signed by a different internal authority.

I'm struggling to figure out why the new cert is fine, but the old one is not. Either the new cert has some magic in it I'm not aware of (like the ultimate parent in the signing chain is one of the well known certs in my CA, but its not showing up when I interrogate the .crt), or the unfamiliar (internal) parent .crt in the signing chain, has been added to the ca-certificates on my ubuntu client.

What are the cli commands on my ubuntu desktop, or the centos client, that I can use to find out? If the reason why the new .crt works, is because of a certificate that's been installed on my desktop, how do I find where that certificate is installed (and how do I copy it on to other centos machines)?

I've tried openssl s_client -connect -showcerts to identify the chain on both servers and they end up with a signing authority CN that is internal. I've downloaded the certs and run openssl verify -verbose -issuer_checks and I don't see any parent authority that I'd recognise. I ran the same things on www.google.com and I get a familiar parent of 'GeoTrust Global CA', so I'm leaning towards the internal parent authority having been added to my local ca-certificates, but how can I check?

The CN which is reporting as the ultimate authority in all cases isn't a DNS name, so I can't download that .crt from somewhere, all I've got is what's in the new url .crt, so can I use openssl to lookup the certificate, from just a CN (which presumably openssl is doing internally to conclude it's valid, if the apparent parent .crt isn't in my local ca-certificates)?

Edit: I think the master key has been added to my chrome (libnss3) certificates. What is needed to add the same master key so it's supported by something other than chrome (like php and openssl on cli)

How to start a custom service

Posted: 29 Jun 2022 07:01 PM PDT

I'm very new to Linux and the solution might be easy so excuse me for that.

I'm trying to run an application called EnCase Remote Recovery, which basically takes a remote image of a system. In order to that, a "servlet" must be deployed on the remote machine. I don't care if the servlet started automatically or manually.

Here is what the guide says: (P.S: the servlet name is enlinuxpc)

  • Method 1: To start it manually:
    • 1.a: Copy the servlet to the machine (Done that).
    • 1.b Insert the following before the STARTX command:LOAD

I have no idea what that means and as far as I know STARTX is something for GUI. I tried executing this: STARTX LOAD enlinuxpc and what I get is this:

/usr/bin/xterm: No absolute path found for shell: LOAD  xinit: connection to x server lost  
  • Method 2: Starting it using xinetd

    • 2.a: Create a configuration file named enlinuxpc in the /etc/xinetd.d directory.
    • 2.b: Using a text editor such as vi, insert the following text into the file, then save and close it.

      service enlinuxpc

      {
      socket_type = stream
      protocol = tcp
      port = 4445
      type = UNLISTED
      wait = yes
      user = root
      server = /usr/local/encase/enlinuxpc
      server_args = -i -p /usr/local/encase
      }

    • 2.c: Restart the xinetd service.

I've done all these steps, however the servlet still not running.

  1. So how can I start it manually?
  2. Is there something missing for method 2?

I'm using Ubuntu.

What's the difference between STDIN and arguments passed to command?

Posted: 29 Jun 2022 05:35 PM PDT

I could use the either form to execute the cat method:

cat file_name  cat < file_name  

The result is the same

Then I want to execute man in the format of stdin

man < file_name  

While file_name contains:

# file_name  cat  

But it pops up What manual page do you want? instead of execute man cat.

I want to know why cat could accept stdin as arguments but man cannot. And what's the difference between command line arguments and stdin?

No comments:

Post a Comment