Friday, November 12, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Building android kernel module without exact kernel source and configs

Posted: 12 Nov 2021 11:31 AM PST

I'm building a very simple android kernel module (returns with no operation in init_module) for my android emulator(that's not a AVD emulator, is a vm on VirtualBox.)

Problem

Unfortunatly, I've no kernel source code for virtual device, and also no configuration file(/proc/config.gz)

What I only know is as follows:

  • Android version & build number (Android 7.1.2, N2G48B)

From here and thanks to groups.google.com, I decided to use kernel source at googlesource.com

  • 'Sample' kernel module pre-installed in emulator (/lib/modules/3.18.48/kernel/drivers/video/backlight/backlight.ko)

I focused on matching patterns with it and mine, as follows.

Section       Data I focused  --------------------------------  .modeinfo     vermagic=3.18.48 SMP preempt mod_unload modversions CORE2  __versions    crc_symbols("module_layout") = 0x31913e64    

Of course, crc version of module_layout is different, so I manually edit it with hex editor.

But when I do insmod hello.ko, emulator get stuck (maybe called kernel-panic?).

I append code of my kernel module, and also makefile.

#include <linux/module.h>  /* Needed by all modules */  #include <linux/kernel.h>  /* Needed for KERN_ALERT */    MODULE_LICENSE("GPL");    int __init init_module(void)  {     // printk("<1>Hello world\n");       return 0;  }      void __exit cleanup_module(void)  {     // printk(KERN_ALERT "Goodbye world 1.\n");  }    // module_init(init_module);  // module_exit(cleanup_module);    
KERNEL_DIR=/home/ubuntu/android-kernel/android-msm-marlin-3.18-nougat-mr2-pixel    export ARCH=x86  export SUBARCH=x86    export CROSS_COMPILE=/home/ubuntu/android-toolchains/qemu-nougat-mr2-pixel-release/kernel-toolchain/android-kernel-toolchain-  export REAL_CROSS_COMPILE=/home/ubuntu/android-toolchains/android-ndk-linux-x86_64-4.9/linux-x86_64/bin/i686-linux-android-    obj-m := hello.o  PWD := $(shell pwd)  default:      $(MAKE) -C $(KERNEL_DIR) SUBDIRS=$(PWD) CFLAGS="-Wno-error=format-truncation" modules  clean:      $(MAKE) -C $(KERNEL_DIR) SUBDIRS=$(PWD) clean  

Question

I thought that the part linked with kernel is only external functions with crc_symbols in __versions section and it would work if I match all version infos and symbols.
But the experiment result wasn't as I thought.

What am I missing here?
Without exact source or configs, is it really impossible to build a working module?

Any suggestion or reply would be appreciated. Thanks.

How to zgrep and then gzip multiple files individually?

Posted: 12 Nov 2021 11:05 AM PST

I have the following code which searches for a term in multiple files (file1.json.gz, file2.json.gz, etc etc) using zgrep, and then using gzip it saves the output into a single file:

zgrep -i 'help' /input/path/*.json.gz | gzip > /output/path/help_file.json.gz  

This works well, but is it possible to change this so that the files in /input/path/ are handled individually? I.e, file1.json.gz becomes file1_filtered.json.gz.

Thanks!

cant run react nginx on port 443 and 80 both are in used

Posted: 12 Nov 2021 10:53 AM PST

I have react, nodejs app and dockerize them. frontend running with Nginx on port 80 and 443 on my local docker-machine. when I run the docker-compose command on my VPS centos it throws an error that ports 80 and 443 are in use.

http            80/tcp          www www-http    # WorldWideWeb HTTP  http            80/udp          www www-http    # HyperText Transfer Protocol  http            80/sctp                         # HyperText Transfer Protocol  https           443/tcp                         # http protocol over TLS/SSL  https           443/udp                         # http protocol over TLS/SSL  https           443/sctp                        # http protocol over TLS/SSL  

what should I do?

How do I type a vinculum?

Posted: 12 Nov 2021 10:48 AM PST

I am attempting to draw a vinculum over a 3.

What I tried: Ctrl + Shift + u to enter unicode, then entering 0305, then enter. I get this: ̅

The issue is I cannot center a digit centered under that character. E.g. if I put the three before, I get , vice versa ̅3. The only option that looks decent has been to put it under both 3̅3.

I don't know, maybe my font rendering is the issue?

Search with less

Posted: 12 Nov 2021 12:01 PM PST

In the output of wget --help I would like to quickly go to the place where the --header option is explained.

enter image description here

I try searching with less. man less explains:

/pattern                Search  forward  in  the  file  for the N-th line containing the pattern.  N defaults to 1.  The pattern is a regular expression, as recognized by the regular                expression library supplied by your system.  The search starts at the first line displayed (but see the -a and -j options, which change this).  

Following this recommendation I try:

wget --help | less /header  

but it causes an error:

/header: No such file or directory  

What is wrong?

Problems with Grub seeing USB drive ParrotOS

Posted: 12 Nov 2021 09:54 AM PST

I have an older MacbookPro i believe an 08 model. I have installed ParrotOS Security on metal. I have now wanted to swap back to Kali but when I put the USB in it to install Kali, the grub bootloader does not show Kali drive or my USB thumb drive. I have tried to use BalenaEtcher and also Rufus and neither will show in the grub loader. Can someone help me find a way for Grub to load the thumb drive so i can select at boot? Thanks!

no ethernet connection when installing debian

Posted: 12 Nov 2021 09:55 AM PST

no ethernet connection when installing debian.

I am using debian net install.

I just need to connect to internet & i plugedin ethernet cable but its unable to connect.

I am inside installer so there is no proper terminal or sudo or ifconfig etc...

GLOBIGNORE='**/dont_doc/**' does not work!

Posted: 12 Nov 2021 11:19 AM PST

I wanted to create a glob expression to ignore any file inside a dont_doc directory, but when I tried using using GLOBIGNORE to do it, it did not work:

$ GLOBIGNORE='**/dont_doc/**'  $ echo dont_doc/**  dont_doc/customBlockHelpers.hbs.js dont_doc/RoClasses.js dont_doc/RoEnums.js dont_doc/RoModules.js dont_doc/RoTypes.js  

this is what I want to happen:

dont_doc/doc.js #Fail  dont_doc/lol/doc.js #Fail  lol/dont_doc/doc.js #Fail  lol/dont_doc/lol/doc.js #Fail  lol.js #Succsed  index.html #Fail  oof/lol.js #Succsed  

how do I fix this?

Edit: I also want to ignore the node_modules folder

How to modify XFCE panel using only bash?

Posted: 12 Nov 2021 09:38 AM PST

How to modify XFCE panel using only bash?

I'm creating Ansible playbook that is to create preconfigured XFCE panel. Modifying files in ~/.config/xfce4/panel is not working. Is it possible to modify panel without GUI?

How do I determine what task is launching another task

Posted: 12 Nov 2021 09:55 AM PST

I am dealing with some essentially virus-like behavior that I'd like to end.

A task 'foo' is running on my computer, generating a lot of calls that are bringing my system performance to its knees. I can kill that task:

for i in `ps -x -U root | grep -i foo | cut -d' ' -f2`; do sudo kill -9 $i ; done  

Unfortunately, an unknown task 'bar' is immediately re-launching foo. I have root access. I'm very tired of having my machine being disabled. How do i make this stop?

Delay between username and password during tty login

Posted: 12 Nov 2021 09:33 AM PST

Recently, I noticed that when using tty to login to my computer, there was a delay (around 20 seconds) between the time I enter my username and the time I'm getting asked for my password. Where can it come from ?

I don't have such delay when using su username or ssh username@localhost and my password is asked right away.

I'm using Arch Linux with kernel 5.14.16.

i3 font size changed after Space got stuck

Posted: 12 Nov 2021 09:04 AM PST

I'm using Arch 5.14.12-arch1-1 with i3 as the window manager. The other day, while browsing in Firefox, I did something trivial (like changing a Firefox tab or jumping to another i3 workspace or just typing) and all of a sudden my computer started spamming the Space character as if I held it down. I tried pressing it a couple of times to try to get anything unstuck, but nothing was stuck in the first place. Since each keystroke of mine now contained Space along with the actual keystroke, all my i3 shortcuts were broken.

I managed to click on another workspace with another window (Telegram), and it didn't go away. I wanted to restart i3, but I effectively didn't have a keyboard anymore, so I had no choice but to forcibly shut down the computer. Once I restarted, the issue was thankfully resolved.

However, it seems I did something in that whole ordeal: everything in i3 got very large: my i3bar and tab/window names' font size, the circular typing indicator of i3exit lock. I went through i3 and i3blocks config files, and I cannot see anything related to size has changed, nor did I see any binding related to font size which might have been inadvertently triggered.

So I have 2 questions:

  • What could have caused the Space spamming thing?
  • What could have caused the enlarging of i3 and how can I revert it?

grep -v does not return complement of grep

Posted: 12 Nov 2021 10:41 AM PST

I want to filter a file for lines starting with a space. I use the following command:

grep -v "^ " < input > input_no_starting_space  

To double check my results, I run the following:

grep "^ " < input > double_check  

and then count the number of lines in input_no_starting_space and double_check to see whether their sum adds up to the number of lines in input. For this I use wc -l.

For some reason, this check fails. Meaning, the sum of the number of lines is less than the number of lines in input. My file has millions of lines, but I cannot seem to reproduce the issue on a small example. Is there by any chance something wrong with the way I use grep (since I would expect that grep and grep -v always give the complement of one another), or is this more likely an artifact in my file? In case of the latter, what could this artifact be?

This is using GNU grep 3.4 on Ubuntu 20.04.3.

xrandr - Doesn't Properly Move Monitors

Posted: 12 Nov 2021 08:49 AM PST

I have a fresh install of Arch Linux running on my desktop machine which has 3 monitors. I have installed X with xf86-video-nouveau (since I have an Nvidea RTX card) and have chosen bspwm to be my window manager.

Following the instructions on the Arch wiki, I have installed xrandr to change the relative positions of the monitors to match their physical layout on my desk. Running xrandr -q gives me the names of the three monitors (DP-1, HDMI-1, DVI-D-1) and I want them to be aranged so that from left to right the order is DVI-D-1 then DP-1 then HDMI-1. To do this I run:

xrandr --output DP-1 --primary --auto --output DVI-D-1 --auto --left-of DP-1  xrandr --output DP-1 --primary --auto --output HDMI-1 --auto --right-of DP-1  

This indeed reorders the monitors so that I can move my mouse from one to the next as you would expect based on the physical layout of the monitors on my desk, but all of the mouse events are still triggered on the wrong monitor. That is, in order to interact with the mouse in a window that is displayed on DP-1, I have to have my mouse on DVI-D-1. To click on a button on HDMI-1, I have to put my mouse on DP-1. And in order to select a window displayed on DVI-D-1, my mouse must be on HDMI-1.

I've looked through the Arch wiki's Multihead page, which specifies how to move monitors and position them relative to one another. Looking in the man for xrandr for --left-of or --right-of warns not to make cyclical location specifications, but doesn't describe the behavour I'm experiencing. Online reference materials explain how to set xrandr with bspwm with regards to the bspwmrc. I've followed those and structured my bspwmrc as recommended on the Arch wiki for multiple monitors.

How do I get xrandr to properly reorient my monitors and my mouse events?

How do I use SSH to launch a nohup ffmpeg command and leave it running after disconnect?

Posted: 12 Nov 2021 08:47 AM PST

I'm trying to launch a series of FFMPEG commands over SSH. My SSH client is the native openssh (7.7.2.1) client in Windows Server 2019 (ver 1809 build 17763.2114). The command I am trying to run is this:

C:\Windows\System32\OpenSSH\ssh.exe -v user1@10.0.0.1 -n -t 'nohup /home/user1/ffmpeg/ffmpeg -f lavfi -i testsrc -f null - -nostdin -nostats -hide_banner -loglevel error &'  

Other stackexchange answers indicate that using the "nohup" and the "&" command will launch the command and release the console. The problem I'm facing is that the command runs, but the console does not release the session and keep the command running.

If I append " \" to the end of the line, the session releases, but the command stops.

If I force disconnect, then the ffmpeg command continues running, but I need a smooth way to release the process so my powershell script can continue running. I want to keep all these commands on one line. How can I connect, launch this command, disconnect and leave it running?

create an alias on ZSH but need to type it twice

Posted: 12 Nov 2021 08:39 AM PST

I'm trying to create an alias on ZSH.

The aim of the alias is to activate a python virtualenv.

I've put a line in my .zshrc

alias SOU="source /home/andykw/.zshrc && source $(setopt extendedglob &&  ls -d .^git/)/bin/activate"  

Often I need to change virtual environment with activating a virtual environment in one of the folder, then switching to another folder and activate another virtual environment.

Example: Let's say I'm working with the folder flask_rest and I have to work on another project, django_rest, I will need to deactivate the flask_rest environment and activate the django_rest environment.

Instead of doing it several times with the command line source <folder_name>/bin/activate then go with another folder source <another_folder_name>/bin/activate, I only need to type SOU.

Hope it makes the context clearer.

PS: I'm using Ubuntu with a Windows Subsystem Linux.

How can I purge and remove all network capabilities from Linux Mint?

Posted: 12 Nov 2021 10:32 AM PST

I have a fresh install of Linux Mint and the necessary software which I like to use.

I was now wondering how can I purge and remove all internet capabilities from my system, WiFi, Ethernet, Bluetooth - the whole lot?

How can the program get multiple numbers as arguments and calculate them? Exemple: 19 10,13 4, 12 3

Posted: 12 Nov 2021 09:50 AM PST

#!/bin/bash  # Show help function  # Call with: -h   function help(){ cat << EOF  Arguments:  Calculate the sum of several numbers. Example: $sum 19 115 21                                                       10  7   3  As soon as a letter is given in the argument, the program issues an error message.   EOF  }    #Main program  if [ "$1" == "-h" ] ; then          help          exit      fi  check='^[0-9]+$'      if ! [[ $var =~ $check ]] ; then          echo "error: Caution! It is not a number!"              continue      fi    x=${1//[^0-9]/}  sum=0    for ((i=0; i<${#x}; i++));    while [[ num -gt 0 ]];do  var=$(($num % 10))  num=$(($num / 10))  sum=$(($sum + $var))  done    echo $sum  

The program must receive one or more numbers as arguments and calculate the sum of digits for each specified number. I don't get anything. How can the program also receive and calculate several numbers as arguments? If loops and while I have used. The explanation must be up to 80 characters.

Reboot and relaunch a script if error

Posted: 12 Nov 2021 08:47 AM PST

I have a script (not written by me, I cannot modify it) that has to run for days, that sometimes fails (exits with an error).

In this case all I have to do is just reboot the server (there is no better solution for now), and restart the script. Currently I do this:

  • log in via SSH

  • screen -S job

  • ./myscript.sh to start the job (let's say this script contains just: dothis and this process might exit with an error)

  • CTRL A, D to detach from screen

  • ...wait a few hours...

  • log in, resume the screen with screen -r job.

    If still running, detach and come back later.
    If the script has failed, sudo reboot, and start at step 1, to make the long job continue.

How to do this without manual intervention?

How to automate this and have the server reboot automatically if the script exists with an error, and then restart the script?

DRBD service vs drbdadm

Posted: 12 Nov 2021 08:55 AM PST

DRBD v9.17 (kernel v9.1.4)

I'm trying to understand the typical roles of drbd when run as a service vs manually with the drbdadm tool which seems newer than some of the walkthroughs I'm seeing online.

When should the service be used vs the drbdadm tool and where does pacemaker fit in regarding control of drbd's failover?

I have created a resource manually using drbdadm and have it up and now showing UPToDate with the status command on both nodes. I need to figure out how to get that implemented in pacemaker for failover and I just think I'm missing the big picture here - The addition of the resource in pacemaker seems a bit more complicated than that of a floating IP... Thanks for reading!

ArcoLinux won't boot after system update

Posted: 12 Nov 2021 11:19 AM PST

Yesterday I updated my computer running ArcoLinux with

sudo pacman -Syu  

and after rebooting it I found that it wouldn't boot. Instead, I got this:

[   0.002194] __common_interrupt: 1.55 No irq handler for vector                                                                           [   0.002194] __common_interrupt: 2.55 No irq handler for vector    [   0.002194] __common_interrupt: 3.55 No irq handler for vector  

Keep in mind that I usually see this when booting the computer, just without the obnoxious gaps where the text is supposed to start! Also, when the OS boots properly the kernel boots after this text (obviously).

I have tried all options for ArcoLinux in the GRUB menu but they all get the same result. When booting from Linux Linux instead of Linux linux_zen I get a terminal cursor in a strange position but other than that there is no difference in behaviour.

I really need some help with getting ArcoLinux up and running again because I use Arco for gaming and if I were to lose it I would lose all save data for some particular games that don't support Steam's online save service for some reason.

Repository is deprecated

Posted: 12 Nov 2021 10:56 AM PST

Hi i run this code in my kali linux terminal Sudo add-apt-repository -remove ppa:ubuntu-wine/ppa It show this message

  • !!please note that this repository is deprecated!! *

  • Actually this is double deprecated and it is also then replaced *

I just want to remove this repository

I'm Using Kali Linux 2021.2

Crackling sound on 3.5 jack whenever I had a few seconds without playing sounds

Posted: 12 Nov 2021 09:59 AM PST

Symptoms


Whenever I plug an audio jack into my PC a loud crackling can be heard in the headphones (tried 2 different pairs), it also happens whenever I play a sound if I didn't already have another audio playing in the last few seconds.

It is as if an audio service or card were putting itself to sleep after a few dozen seconds of inactivity and resuming it would cause a single crackling noise then the audio is clean again. A similar but much less agressive sound is heard a few seconds after an audio is done playing.

The crackling sound is much louder at its first instance (after boot) than any other time, it also happens whenever I plug in headphones or when the pc turns off.

System


I use a clean install of Parrot OS 5.0 (LTS) (debian based) on a stock HP ENVY PHOENIX 860-080nz 1.04(except for the storage), the issue was there from day one.

Here is the output of cat /proc/asound/cards

 0 [PCH            ]: HDA-Intel - HDA Intel PCH                        HDA Intel PCH at 0xdf320000 irq 129   1 [NVidia         ]: HDA-Intel - HDA NVidia                        HDA NVidia at 0xdf080000 irq 17   2 [AUDIO          ]: USB-Audio - USB  AUDIO                        USB  AUDIO at usb-0000:00:14.0-7, full speed  

Devices 0 and 1 use the snd_hda_intel driver which is native to the kernel, I didn't touch this.

Here is cropped output of lspci -v

01:00.1 Audio device: NVIDIA Corporation GM200 High Definition Audio (rev a1)          Subsystem: Hewlett-Packard Company GM200 High Definition Audio          Flags: bus master, fast devsel, latency 0, IRQ 17          Memory at df080000 (32-bit, non-prefetchable) [size=16K]          Capabilities: <access denied>          Kernel driver in use: snd_hda_intel          Kernel modules: snd_hda_intel  [...]  00:1f.3 Audio device: Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller (rev 31)          DeviceName: Onboard Audio          Subsystem: Hewlett-Packard Company 100 Series/C230 Series Chipset Family HD Audio Controller          Flags: bus master, fast devsel, latency 32, IRQ 129          Memory at df320000 (64-bit, non-prefetchable) [size=16K]          Memory at df300000 (64-bit, non-prefetchable) [size=64K]          Capabilities: <access denied>          Kernel driver in use: snd_hda_intel          Kernel modules: snd_hda_intel  

Other tests I did


USB speakers work perfectly fine.

This happens whether I am in headless mode or not (I suspected it might be KDE as the first crackling at boot comes during the KDE splash logo)

I dual boot with windows and have no such issues on the Windows side so I'm certain it's no hardware issue.

How to delete all lines in a text file which have less than 'x' characters?

Posted: 12 Nov 2021 08:55 AM PST

How can I delete all lines in a text file which have fewer than 'x' letters OR numbers OR symbols? I can't use awk 'length($0)>' as it will include spaces.

Virt-install error: can't load ignition file

Posted: 12 Nov 2021 11:05 AM PST

I'm trying to install Fedora CoreOS using virt-install, as described here: https://docs.fedoraproject.org/en-US/fedora-coreos/getting-started/

The exact command I'm running: virt-install --connect qemu:///system -n fcos -r 2048 --os-variant=fedora31 --import --graphics=none --disk size=10,backing_store=fedora-coreos-31.20200310.3.0-qemu.x86_64.qcow2 --qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=/home/test/Downloads/example.ign"

is returning this error:

Allocating 'fcos.qcow2'                                                                                              |  10 GB  00:00:00       ERROR    internal error: qemu unexpectedly closed the monitor: 2020-04-05T14:52:47.919380Z qemu-system-x86_64: -fw_cfg name=opt/com.coreos/config,file=/home/test/Downloads/example.ign: can't load /home/test/Downloads/example.ign  Removing disk 'fcos.qcow2'                                                                                           |    0 B  00:00:00       Domain installation does not appear to have been successful.  

I'm running this command as root. The ignition file is working as I've successfully used it to deploy this VM from an iso file.

DS-Lite: Extended NAT binding table

Posted: 12 Nov 2021 08:45 AM PST

I'm trying to set up a DS-Lite AFTR. Because of the overlapping addresses of the tunnel connections to the B4s, a normal NAT table does not work (already tried iptables -t nat -A POSTROUTING -j MASQUERADE), as described in RFC 6333. An extended NAT table would also contain the source IPv6 address of the packet sent by the B4, which means the AFTR then knows which tunnel to use in order to forward the packet.

How to do that extension on Linux?

I'm using a Debian based system (Ubuntu 18.04).

I'm establishing tunnels using ip tunnel add dslite mode ip4ip6 local <IPv6 address of AFTR> remote <IPv6 address of B4> The AFTR has the address 192.0.0.1/29 on each tunnel interface and the B4s have the address 192.0.0.2/29 on their tunnel interfaces.

Note: I notice a lack of resources on that topix which is a shame. This is exactly why I'm asking here. Any help is appreciated!

Can't SFTP with sftp command but can connect with sftp:// and other sftp clients

Posted: 12 Nov 2021 09:02 AM PST

I have been stuck with this issue all afternoon and I don't know what is going on. The reason why I need to use the sftp command is because I am using it in a shell script. If there is another program I could use that comes with CentOS 7 that allows me to download a file using SFTP then please enlighten me.

EDIT 1

SFTP clients used: WinSCP and PSFTP.

Tested this from different computers both running on the same network and from the internet (used only IP addresses here). This works as expected from the same computer (used localhost and loopback address).

Firewalld service is stopped, and no proxy is being used or has been configured at any time.

The error I am getting is (using sftp -vvv sftp@hostname):

debug1: connect to ipaddress port 22: Connection timed out  ssh: connect to host ipaddress port 22: Connection timed out  Couldn't read packet: Connection reset by peer  

My sshd_config file (server-side):

#       $OpenBSD: sshd_config,v 1.93 2014/01/10 05:59:19 djm Exp $    # This is the sshd server system-wide configuration file.  See  # sshd_config(5) for more information.    # This sshd was compiled with PATH=/usr/local/bin:/usr/bin    # The strategy used for options in the default sshd_config shipped with  # OpenSSH is to specify options with their default value where  # possible, but leave them commented.  Uncommented options override the  # default value.    # If you want to change the port on a SELinux system, you have to tell  # SELinux about this change.  # semanage port -a -t ssh_port_t -p tcp #PORTNUMBER  #  #Port 22  #AddressFamily any  #ListenAddress 0.0.0.0  #ListenAddress ::    # The default requires explicit activation of protocol 1  #Protocol 2    # HostKey for protocol version 1  #HostKey /etc/ssh/ssh_host_key  # HostKeys for protocol version 2  HostKey /etc/ssh/ssh_host_rsa_key  #HostKey /etc/ssh/ssh_host_dsa_key  HostKey /etc/ssh/ssh_host_ecdsa_key  HostKey /etc/ssh/ssh_host_ed25519_key    # Lifetime and size of ephemeral version 1 server key  #KeyRegenerationInterval 1h  #ServerKeyBits 1024    # Ciphers and keying  #RekeyLimit default none    # Logging  # obsoletes QuietMode and FascistLogging  #SyslogFacility AUTH  SyslogFacility AUTHPRIV  #LogLevel INFO    # Authentication:    #LoginGraceTime 2m  PermitRootLogin yes  #StrictModes yes  #MaxAuthTries 6  #MaxSessions 10    #RSAAuthentication yes  #PubkeyAuthentication yes    # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2  # but this is overridden so installations will only check .ssh/authorized_keys  AuthorizedKeysFile      .ssh/authorized_keys    #AuthorizedPrincipalsFile none    #AuthorizedKeysCommand none  #AuthorizedKeysCommandUser nobody    # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts  #RhostsRSAAuthentication no  # similar for protocol version 2  #HostbasedAuthentication no  # Change to yes if you don't trust ~/.ssh/known_hosts for  # RhostsRSAAuthentication and HostbasedAuthentication  #IgnoreUserKnownHosts no  # Don't read the user's ~/.rhosts and ~/.shosts files  #IgnoreRhosts yes    # To disable tunneled clear text passwords, change to no here!  #PasswordAuthentication yes  #PermitEmptyPasswords no  PasswordAuthentication yes    # Change to no to disable s/key passwords  #ChallengeResponseAuthentication yes  ChallengeResponseAuthentication no    # Kerberos options  #KerberosAuthentication no  #KerberosOrLocalPasswd yes  #KerberosTicketCleanup yes  #KerberosGetAFSToken no  #KerberosUseKuserok yes    # GSSAPI options  #GSSAPIAuthentication yes  GSSAPIAuthentication no  GSSAPICleanupCredentials no  #GSSAPIStrictAcceptorCheck yes  #GSSAPIKeyExchange no  #GSSAPIEnablek5users no    # Set this to 'yes' to enable PAM authentication, account processing,  # and session processing. If this is enabled, PAM authentication will  # be allowed through the ChallengeResponseAuthentication and  # PasswordAuthentication.  Depending on your PAM configuration,  # PAM authentication via ChallengeResponseAuthentication may bypass  # the setting of "PermitRootLogin without-password".  # If you just want the PAM account and session checks to run without  # PAM authentication, then enable this but set PasswordAuthentication  # and ChallengeResponseAuthentication to 'no'.  # WARNING: 'UsePAM no' is not supported in Red Hat Enterprise Linux and may cause several  # problems.  UsePAM yes    #AllowAgentForwarding yes  #AllowTcpForwarding yes  #GatewayPorts no  X11Forwarding yes  #X11DisplayOffset 10  #X11UseLocalhost yes  #PermitTTY yes  #PrintMotd yes  #PrintLastLog yes  #TCPKeepAlive yes  #UseLogin no  UsePrivilegeSeparation sandbox          # Default for new installations.  #PermitUserEnvironment no  #Compression delayed  ClientAliveInterval 60  #ClientAliveCountMax 3  #ShowPatchLevel no  #UseDNS yes  #PidFile /var/run/sshd.pid  #MaxStartups 10:30:100  #PermitTunnel no  #ChrootDirectory none  #VersionAddendum none    # no default banner path  #Banner none    # Accept locale-related environment variables  AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES  AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT  AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE  AcceptEnv XMODIFIERS    # override default of no subsystems  Subsystem       sftp    internal-sftp    # Example of overriding settings on a per-user basis  #Match User anoncvs  #       X11Forwarding no  #       AllowTcpForwarding no  #       PermitTTY no  #       ForceCommand cvs server  Match User sftp  ForceCommand internal-sftp  PasswordAuthentication yes  ChrootDirectory /home/sftp  PermitTunnel no  AllowAgentForwarding no  AllowTcpForwarding no  X11Forwarding no  

Code used to create the user:

mkdir -p /home/sftp  chown root /home/sftp  chmod 755 -R /home/sftp  useradd -d /home/sftp -r sftp  usermod -s /sbin/nologin sftp  echo "password" | passwd --stdin sftp  

I have not touched the sshd_config file from the clients, so I guess it is just the defaults from installation (in my implementation I cannot change those configuration files).

WiFi not working properly in Ubuntu 14.04 LTS on Macbook Pro

Posted: 12 Nov 2021 11:02 AM PST

I just installed Ubuntu 14.04 LTS on my Macbook Pro. Everything seems to work fine except the WiFi. The wireless connection is very slow and intermittent. Wired connection works like a charm however.

I tried the solution here but it didn't work: https://askubuntu.com/questions/272010/extremely-slow-and-or-unreliable-wifi-on-a-2009-macbook-pro-with-bcm4322

Could someone help me?

Thanks in advance, Max

What are the advantages of a nomultilib system?

Posted: 12 Nov 2021 10:05 AM PST

I see that my Linux operating system has support for a nomultilib system. As far as I can tell, that means that no 32-bit packages will be installed on the system, meaning the entire system will be 64-bit.

I can find a lot of information about what a nomultilib system is and how to change to one, but there's one question I can't find an answer to:

Is there any benefiet to running a nomultilib system?

set tab color in a tabbed terminal emulator

Posted: 12 Nov 2021 12:00 PM PST

I would like to set in my terminal emulator (i.e. gnome-terminal) the color of the tabs like in the osx's terminal emulator. Is there this feature in any of the linux terminal emulator plethora?

EDIT: below a picture to better explain the desired result.

enter image description here

1 comment:

  1. E-Techbytes: Recent Questions - Unix And Linux Stack Exchange >>>>> Download Now

    >>>>> Download Full

    E-Techbytes: Recent Questions - Unix And Linux Stack Exchange >>>>> Download LINK

    >>>>> Download Now

    E-Techbytes: Recent Questions - Unix And Linux Stack Exchange >>>>> Download Full

    >>>>> Download LINK yk

    ReplyDelete