Thursday, April 1, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


^[ in debian login prompt - cannot login

Posted: 01 Apr 2021 10:12 AM PDT

I'm trying to use Debian on an Intel Compute Stick. I am using the ISO Image firmware-10.9.0-amd64-netinst.iso as the Compute Stick uses proprietary WiFi Drivers. I can progress through the graphical install without issue, and select to install the operating system with no desktop environment.

When the machine reboots post-install, I am greeted with the login prompt. I can type my username in correctly once, but the system them tells me my password is incorrect.

When I next attempt to login, instead of displaying the correct character, the characters ^[ are prepended. For example, if I type "e", "^[e" is displayed on the prompt. I suspect these characters are being typed into the password field,and things are going wrong when I press enter after the username.

If I press CTRL-C, or switch to a different VTTY, the login field works correctly, but again, the password and future attempts have the same issue. I have tried using both UK and US keyboards, with both the UK and US layouts selected at install time, but this does not solve the issue.

The issue occurs using both the normal and numpad enter key.

I would like to know what these characters mean, and how to go about solving this issue. Issue by typing e

gpg-agent (macOS) doesn't provide any key for SSH

Posted: 01 Apr 2021 09:40 AM PDT

There are several topics addressing similar issues, but none of the solutions provided there work for my environment, being:

  • macOS 11.2.3 (MacBookPro M1/Apple silicon)
  • GnuPG 2.2.27 (installed via Homebrew)
  • Zsh shell
  • GPG key with Auth-only subkey for SSH

The ~/.gnupg/gpg-agent.conf file:

pinentry-program /opt/homebrew/bin/pinentry-tty  enable-ssh-support  

The ~/.gnupg/sshcontrol file:

FADD8723...AE7ED (the keygrip retreived with `gpg -K --with-keygrip`)  

The ~/.zshrc file:

unset SSH_AGENT_PID  export GPG_TTY="$(tty)"  export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)  gpgconf --launch gpg-agent  

I made sure ssh-agent is not running (also rebooted the system to be sure). But no keys are found when running:

ssh-add -L  The agent has no identities  

What am i missing?

In syslog or rsyslog, are ring buffer, queue of message, and write buffer the same?

Posted: 01 Apr 2021 10:11 AM PDT

I am wondering how ring buffer and queue and write buffer work together in syslogd or rsyslogd. Are the ring buffer, the queue of messages, and the write buffer the same?

  • Most implementations of syslogd queue messages for a short time, and handle duplicate messages which arrive at the queue during this period.

  • A sync to the disk on each write to the file can be delayed for faster writes, by - preceding the filename in /etc/syslog.conf, for example *.debug;mail.none;news.none -/var/log/messages

When syslogd or rsyslogd writes new logs into the ring buffer, does it also write the same new logs to file /var/log/syslog? At any time, is the content of the ring buffer always part of the content of file /var/log/syslog, or can it be ahead of the file and make the content of the file outdated?

thread profiling and monitoring

Posted: 01 Apr 2021 08:32 AM PDT

how can I get lock time values specifically of the threads of any process? in linux.. I was using the command /proc/pid/stat but I am unable to determine which values are of lock time.

Why is the EXT3 FS size much smaller vs. partition size?

Posted: 01 Apr 2021 09:05 AM PDT

We have a partition, which is exactly 50 GByte sized:

# fdisk -l /dev/sdb  Disk /dev/sdb: 50 GiB, 53687091200 bytes, 104857600 sectors  Units: sectors of 1 * 512 = 512 bytes  Sector size (logical/physical): 512 bytes / 512 bytes  I/O size (minimum/optimal): 512 bytes / 512 bytes  #  

And we have an EXT3 FS on it, which in 100% filling up the partition, so the partition doesn't have any free.

But the EXT3 FS size (not the free space) is much smaller than the partition size:

# df -m /myFS  Filesystem     1M-blocks  Used Available Use% Mounted on  /dev/sdb           50141  5936     41645  13% /myFS  

50141/1024 is just 48,9 GBytes.

The big question: Where did the (51200 - 50141) 1059 MBytes go?

Already thinked about it:

There are 242131 inodes, maybe that consumes 1059 MBytes? But we are talking about the FS size, not the available space in the FS. inodes could take free space, but not the filesystem size.

# df -i /myFS  Filesystem      Inodes  IUsed   IFree IUse% Mounted on  /dev/sdb       3342336 242131 3100205    8% /myFS  #  

And yes, as said, FS is at 100% of the partition (disk itself):

# resize2fs /dev/sdb  resize2fs 1.42.11 (09-Jul-2014)  The filesystem is already 13107200 blocks long.  Nothing to do!  #  

And yes, the "/etc/mke2fs.conf" is the default, what a SLES12.3 gives.

How can I get Windows to let me always boot straight into grub

Posted: 01 Apr 2021 07:59 AM PDT

I dualboot Ubuntu and Windows and have 2 SSD's. The first one, 1TB is dedicated to Windows and the other, 500GB is for Ubuntu. I had it setup to boot into Grub but every time Windows would upgrade or something, it seemed to trash that and the system would just boot straight into Windows. So I have been just hitting F11 on boot to get the options up and then selecting Ubuntu when I need it, which takes me to grub and then I actually select it. All this works, but it's a bit of pain. Is there an easier way to configure this? I don't want to have to set things up again every time Windows updates. Even just defaulting to the BIOS boot menu every startup would do, but I don't see a way in the BIOS to set that (MSI B450 MB).

If it helps:

$  efibootmgr -v  BootCurrent: 0001  Timeout: 2 seconds  BootOrder: 0000,0001,0002  Boot0000* Windows Boot Manager  HD(2,GPT,c6a1dba9-5c97-46d3-b98c-a9bcb9f5184d,0xfa000,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...a................  Boot0001* ubuntu    HD(1,GPT,1cb82576-8a01-4836-a909-440920fe0ea4,0x800,0x32000)/File(\EFI\UBUNTU\SHIMX64.EFI)  Boot0002* ubuntu    HD(2,GPT,c6a1dba9-5c97-46d3-b98c-a9bcb9f5184d,0xfa000,0x32000)/File(\EFI\UBUNTU\SHIMX64.EFI)..BO  

What's weird about that is the second Ubuntu option points at the 1TB disc (according to the name that comes up in the boot menu), which doesn't have an Ubuntu installation. But it seems to work, and launches the installation on the 500GB disc. This option I had deleted a couple of times, but every time Windows messes with it, it adds that option back.

So hitting Boot0001 or Boot0002 takes me to grub whose menu is:

$  awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg   Ubuntu  Ubuntu, with Linux 5.4.0-70-generic  Ubuntu, with Linux 5.4.0-70-generic (recovery mode)  Ubuntu, with Linux 5.4.0-67-generic  Ubuntu, with Linux 5.4.0-67-generic (recovery mode)  Windows Boot Manager (on /dev/sda2)  UEFI Firmware Settings  

How to retrieve the I/O state of individual DDR4 memory chips

Posted: 01 Apr 2021 07:30 AM PDT

I've been wanting to put more use to the RGB of my machine for more than just simple aesthetics, but actual machine state monitoring for particular devices...

I have some corsair RAM with 10 RGB LEDs and 16 DDR4 packages on each module, and what I'd like to do is control 8 of the LEDs, dedicating particular diodes to particular chip I/O states through software...
(I can already control the LEDs with OpenRGB, but can't do anything interesting)

How can I retrieve the necessary information to know when a particular package is being read from or written to so I can update the associated LEDs appropriately?

samba 4 and encryption with windows 10 and smb.conf

Posted: 01 Apr 2021 07:43 AM PDT

In RHEL/CentOS 7.9 x86-64 with samba-4.10.16-9.el7_9

I have all local user accounts in /etc/passwd and my /etc/samba/smb.conf is this

[global]      workgroup = SAMBA      security = user        passdb backend = tdbsam        printing = bsd      printcap name = /dev/null      load printers = no      disable spoolss = yes      #       cups options = raw          log level = 0 vfs:10        log file = /var/log/samba/sambavfs.log        # no log rotation        max log size = 0        smb encrypt = required      client min protocol = SMB3      client max prototcol = SMB3    [homes]      comment = Home Directories      valid users = %S, %D%w%S      browseable = No      read only = No      inherit acls = Yes      vfs objects = extd_audit    [data]      comment = data      inherit acls = Yes      read only = No      path = /data      directory mask = 770      create mask = 660      vfs objects = extd_audit  

From a windows 10 pc, when someone does \\myserver and they get access to whatever folders are being shared out, when they download or upload files to the share across the network is that encrypted inherently/automatically?

I believe it is, per https://wiki.samba.org/index.php/Samba_Security_Documentation#Simplified_overview_of_Samba_encryption

SMB Signing and Encryption

  • SMBv1 Encryption applies the normal encryption modes of NTLMSSP or GSSAPI(krb5) in a similar wrapping to SASL.
  • SMB2 Signing uses HMAC-SHA256.
  • SMBv3 Encryption: AES-128-CCM and AES-128-GCM are used to encrypt the session using a derived session key. 13.7. Samba implementation

Is my smb.conf shown above correct regarding having a samba share and encryption... is that all that is needed?

If you don't explicitly force SMB3 state smb encrypt = required like I did, what happens?

And did something change with Microsoft Windows 10 (or maybe it was win7) because I specifically remember that min protocol = smb3 did not work and had to say smb2 there; but right now it is working with smb3. So if anyone knows something specifically to set in the microsoft window 7/8/10 operating system that may be relevant (registry setting) please share.

Linux Bash syntax

Posted: 01 Apr 2021 07:30 AM PDT

I don't understand what it means in a Linux Bash shell script:

MYSET=${*:- "-a"}  

Can anyone explain?

Why can't connect internet after replacing the moterboard?

Posted: 01 Apr 2021 07:11 AM PDT

My old pc use a H81M motherboard for 8 years,dual os--win10 and debian installed in it,today i buy a new M81H motherboard (same H81M board,different brand) and replace the old one.
Network structure: modem + router.
Reboot my pc ,enter into win10,it can connect internet as normal.
Reboot my pc ,enter into debian,it can't connect internet.

lspci |grep -i  Ethernet  01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)  lspci -v  01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)      Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller      Flags: bus master, fast devsel, latency 0, IRQ 25      I/O ports at e000 [size=256]      Memory at f7c04000 (64-bit, non-prefetchable) [size=4K]      Memory at f7c00000 (64-bit, non-prefetchable) [size=16K]      Capabilities: <access denied>      Kernel driver in use: r8168      Kernel modules: r8168    sudo systemctl status wicd  #It is in good status.  lsmod |grep 816  r8168      cat  /etc/network/interfaces  auto lo  iface lo inet loopback    auto eth0  iface eth0 inet dhcp  

How to fix it?

How to determine if the device is battery-less or not using c++ program

Posted: 01 Apr 2021 06:30 AM PDT

I have a requirement to determine if the device on which my c++ application is running is battery less or not. I didn't find a standard way to do this. I found some terminal commands such as upower -d which gives an attribute 'on-battery': yes/no. But is upower installed by default on all linux systems? If not what else can be used?

Thanks!

Is there a way to get the modern app launchers on xfce?

Posted: 01 Apr 2021 07:32 AM PDT

I am tired of searching for a way to open apps like it is in windows or other DEs like cinnamon where you click the app launcher and it opens with leaving a indicator on the app launcher.
However in xfce it is totally different the best setup I could do was adding the app launcher and window buttons but its still not what I want this is what my current setup works like:

enter image description here

find value and write it in 12,2 chars long format

Posted: 01 Apr 2021 07:32 AM PDT

example input:

:20:210301/9944072  :25:PL63213000342008099410720012  :28C:6032563  :60F:C2101010101PLN4138,23  :61:2101010101D13,61  :86:^101  ^20Text ANY  ^27YTRDTAL co. ltd.  ^30  ^31  

find lines that start with one of these: :60F: :61: :62M: :60M: :62F:

find value that starts after string C, or D, or PLN (value in example is 4138,23 and 13,61)

write value in format of 12,2 characters

needed output:

:20:210301/9944072  :25:PL63213000342008099410720012  :28C:6032563  :60F:C2101010101PLN000000004138,23  :61:2101010101D000000000013,61  :86:^101  ^20Text ANY  ^27YTRDTAL co. ltd.  ^30  ^31  

EDIT: before I've used awk to change date format from YYMMDD to YYMMDDMM like this:

cat ./${file}.tmp.mt940 | awk -F ':61:' '{if ($1)  print $1;  else  printf "%s%s%s%s\n", substr($0,0,6), substr($0,7,4), substr($0,7,4), substr($0,11,40)  }' > ${file}.tmp2.mt940  

now I try to do same with adding zeros but do not now how to search in awk between two different chars/strings (D,C,PLN and comma)

compare the word after char occurence in each line

Posted: 01 Apr 2021 08:21 AM PDT

I have a file with many number of lines like below.

123)hfd)jggg)7584)abc  123)))7584)abc  )hfd)jggg)7584)cdf)))abc  )hfd)))abc  

I have to output the lines with abc excatly after 4th occurence of the ) [close bracket]. So output should be:

123)hfd)jggg)7584)abc  123)))7584)abc  )hfd)))abc  

possible to create a symbolic link to a existed directory? [closed]

Posted: 01 Apr 2021 09:06 AM PDT

I have this directory with some files:

/lib/modules/4.15/build  

build is a physical directory, not a link.

I want to merge the content in:

/usr/src/linux-headers-4.15-generic  

I did:

ln -sf /usr/src/linux-headers-4.15-generic /lib/modules/4.15/build  

it will always create a new folder named linux-headers-4.15-generic in /lib/modules/4.15/build

the result is not my expectation.

Help with while on unix shell script [closed]

Posted: 01 Apr 2021 08:52 AM PDT

This script is supposed to obtain the user's name and print it 5 times. After that, it asks the user if they want to continue.

If the answer is y or Y, the program keeps printing.
If the answer is n or N, the program stops.
In case of any other answer, the script asks for a correct answer.

I am stuck.

echo  "What's your name?"  read name    answer=y  while [ "$answer" = "y" ]  [ "$answer" = "Y" ]  do      for i in 1 2 3 4 5           do          echo $name          done      echo "Do you want to continue?"      read answer        while [ "$answer"!= "Y" ]  [ "$answer" != "y" ]  [ "$answer" != "n" ]  [ "$answer" != "N" ]      do       echo "Give me a correct answer"      read answer     done    done  

split a multifasta file into different files with new headers

Posted: 01 Apr 2021 09:55 AM PDT

Input file: 131751_pphA.fasta

>ID:NDNDCOEC_02118 |[Genus species]|strain|PANS_1_2_annot.gbk|pphA|855|NODE_3_length_422941_cov_112.146787422941(422941):170566-171420:1 ^^ Genus species strain strain.|neighbours:ID:NDNDCOEC_02117(1),ID:NDNDCOEC_02119(1)|neighbour_genes:hypothetical protein,ntaA| | aligned:1-284 (284)  MIKKLIAEKGTLIFIEAHNPLSALIASKAEQTNSEGRIVKFDGIWSSSLTDSASRGIPDNETLALSSRLENIADIRNVTDMPIIMDADTGGKPEHFSYYVKRMINNGVNGVIIEDKTGLKKNSLFGTEVEQTLADINDFSEKIKRGKSAVYIDDFMIIARLESLIAGFDVEHALERADAYVEAGADGIMIHSCKKTPDEVFLFSTKFRKKYPSVPLICVPTTYSATSNRELSEAGFNVIIYANHMLRAAYKAMENVSKEILRYGRTAEIEKSCMSVKEIISLIP  >ID:KJDCINFB_03194 |[Genus species]|strain|PNA_1_5_annot.gbk|pphA|855|NODE_5_length_527105_cov_93.286545527105(527105):274765-275619:1 ^^ Genus species strain strain.|neighbours:ID:KJDCINFB_03193(1),ID:KJDCINFB_03195(1)|neighbour_genes:hypothetical protein,ntaA| | aligned:1-284 (284)  MIKKLIAEKGTLIFIEAHNPLSALIASKAEQTNSEGRIVKFDGIWSSSLTDSASRGIPDNETLALSSRLENIADIRNVTDMPIIMDADTGGKPEHFSYYVKRMINNGVNGVIIEDKTGLKKNSLFGTEVEQTLADINDFSEKIKRGKSAVYIDDFMIIARLESLIAGFDVEHALERADAYVEAGADGIMIHSCKKTPDEVFLFSTKFRKKYPSVPLICVPTTYSATSNRELSEAGFNVIIYANHMLRAAYKAMENVSKEILRYGRTAEIEKSCMSVKEIISLIP  >ID:LBFHNJKP_02554 |[Genus species]|strain|PANS_1_6_annot.gbk|pphA|855|NODE_4_length_527158_cov_95.108790527158(527158):251540-252394:-1 ^^ Genus species strain strain.|neighbours:ID:LBFHNJKP_02553(-1),ID:LBFHNJKP_02555(-1)|neighbour_genes:ntaA,hypothetical protein| | aligned:1-284 (284)  MIKKLIAEKGTLIFIEAHNPLSALIASKAEQTNSEGRIVKFDGIWSSSLTDSASRGIPDNETLALSSRLENIADIRNVTDMPIIMDADTGGKPEHFSYYVKRMINNGVNGVIIEDKTGLKKNSLFGTEVEQTLADINDFSEKIKRGKSAVYIDDFMIIARLESLIAGFDVEHALERADAYVEAGADGIMIHSCKKTPDEVFLFSTKFRKKYPSVPLICVPTTYSATSNRELSEAGFNVIIYANHMLRAAYKAMENVSKEILRYGRTAEIEKSCMSVKEIISLIP  >ID:GPMHBDBL_03046 |[Genus species]|strain|PNA_200_2_annot.gbk|pphA_2|855|NODE_4_length_530984_cov_86.347264530984(530984):275036-275890:1 ^^ Genus species strain strain.|neighbours:ID:GPMHBDBL_03045(1),ID:GPMHBDBL_03047(1)|neighbour_genes:hypothetical protein,ntaA| | aligned:1-284 (284)  MIKKLIAEKGTLIFIEAHNPLSALIASKAEQTNSEGRIVKFDGIWSSSLTDSASRGIPDNETLALSSRLENIADIRNVTDMPIIMDADTGGKPEHFSYYVKRMINNGVNGVIIEDKTGLKKNSLFGTEVEQTLADINDFSEKIKRGKSAVYIDDFMIIARLESLIAGFDVEHALERADAYVEAGADGIMIHSCKKTPDEVFLFSTKFRKKYPSVPLICVPTTYSATSNRELSEAGFNVIIYANHMLRAAYKAMENVSKEILRYGRTAEIEKSCMSVKEIISLIP  

Desired output: four separate output files:

PANS_1_2_pphA.fasta

>PANS_1_2_pphA  MIKKLIAEKGTLIFIEAHNPLSALIASKAEQTNSEGRIVKFDGIWSSSLTDSASRGIPDNETLALSSRLENIADIRNVTDMPIIMDADTGGKPEHFSYYVKRMINNGVNGVIIEDKTGLKKNSLFGTEVEQTLADINDFSEKIKRGKSAVYIDDFMIIARLESLIAGFDVEHALERADAYVEAGADGIMIHSCKKTPDEVFLFSTKFRKKYPSVPLICVPTTYSATSNRELSEAGFNVIIYANHMLRAAYKAMENVSKEILRYGRTAEIEKSCMSVKEIISLIP  

PNA_1_5_pphA.fasta

>PNA_1_5_pphA  MIKKLIAEKGTLIFIEAHNPLSALIASKAEQTNSEGRIVKFDGIWSSSLTDSASRGIPDNETLALSSRLENIADIRNVTDMPIIMDADTGGKPEHFSYYVKRMINNGVNGVIIEDKTGLKKNSLFGTEVEQTLADINDFSEKIKRGKSAVYIDDFMIIARLESLIAGFDVEHALERADAYVEAGADGIMIHSCKKTPDEVFLFSTKFRKKYPSVPLICVPTTYSATSNRELSEAGFNVIIYANHMLRAAYKAMENVSKEILRYGRTAEIEKSCMSVKEIISLIP  

PANS_1_6_pphA.fasta

>PANS_1_6_pphA  MIKKLIAEKGTLIFIEAHNPLSALIASKAEQTNSEGRIVKFDGIWSSSLTDSASRGIPDNETLALSSRLENIADIRNVTDMPIIMDADTGGKPEHFSYYVKRMINNGVNGVIIEDKTGLKKNSLFGTEVEQTLADINDFSEKIKRGKSAVYIDDFMIIARLESLIAGFDVEHALERADAYVEAGADGIMIHSCKKTPDEVFLFSTKFRKKYPSVPLICVPTTYSATSNRELSEAGFNVIIYANHMLRAAYKAMENVSKEILRYGRTAEIEKSCMSVKEIISLIP  

PNA_200_2_pphA_2.fasta

>PNA_200_2_pphA_2  MIKKLIAEKGTLIFIEAHNPLSALIASKAEQTNSEGRIVKFDGIWSSSLTDSASRGIPDNETLALSSRLENIADIRNVTDMPIIMDADTGGKPEHFSYYVKRMINNGVNGVIIEDKTGLKKNSLFGTEVEQTLADINDFSEKIKRGKSAVYIDDFMIIARLESLIAGFDVEHALERADAYVEAGADGIMIHSCKKTPDEVFLFSTKFRKKYPSVPLICVPTTYSATSNRELSEAGFNVIIYANHMLRAAYKAMENVSKEILRYGRTAEIEKSCMSVKEIISLIP  

The multifasta input file (131751_pphA.fasta) contains four fasta sequences with headers. I want four output files that are individual fasta sequences with their names and headers named as per the strain as mentioned above. For example, one of headers in the input fasta contains the strain information as |strain|PANS_1_2_annot.gbk|pphA|. The output file should have its name as PANS_1_2_pphA.fasta and its header as >PANS_1_2_pphA.

Similarly the other output files as
PNA_1_5_pphA.fasta with header >PNA_1_5_pphA
PANS_1_6_pphA.fasta with header >PANS_1_6_pphA
PNA_200_2_pphA_2.fasta with header >PNA_200_2_pphA_2

Tried the following code:

awk -F "|" '/^>/ {close(F); ID=$1; gsub("^>", "", ID); F=ID".fasta"} {print >> F}' 123764_pphA.fasta   

Resulting in fasta output files with following names:

ID:BKKCPFME_02840 .fasta  ID:EKPOMJAO_03222 .fasta  ID:HEIIBHGJ_01315 .fasta  ID:KBMOKBJB_03162 .fasta  ID:LECGKDGM_03166 .fasta  

can't use RDP client with VPN on

Posted: 01 Apr 2021 07:51 AM PDT

As soon as I turn on my corporate VPN, remmina looses connection (rdp protocol to a host outside of VPN). Similarly, as soon as I turn off tap0 connection created by VPN, remmina starts working again.

I d rather have both, how I can achieve that?

I am on:

denis@debian:~$ uname -a  Linux debian 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux  

remmina version: 1.3.3

I do not have access to VPN server, it's a corporate environnement so I won't be able to modify any settings there. I am not sure I should dump all route information here?..

Some information on VPN (OpenVPN):

vpn.service-type:                       org.freedesktop.NetworkManager.openvpn  GENERAL.DEVICES:                        wlo1  VPN.CFG[7]:                             dev = tap0      openvpn config file:  client  dev tap0  proto udp  remote-cert-tls server  remote ******  cipher AES-256-CBC  auth SHA512  tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-256-CBC-SHA:TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA:TLS-DHE-RSA-WITH-AES-128-CBC-SHA:TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA  resolv-retry infinite  nobind  persist-key  persist-tun  verb 3  comp-lzo  pull  setenv PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin  script-security 2  up /etc/openvpn/scripts/update-systemd-resolved  down /etc/openvpn/scripts/update-systemd-resolved  down-pre  

Kali Error while installing any package

Posted: 01 Apr 2021 10:06 AM PDT

I had recently installed kali from parrot.

After Successful installation. I run

sudo apt-get update  sudo apt upgrade  

Now I am unable to install any package. It shows me error:

Reading package lists... Done  Building dependency tree         Reading state information... Done  Some packages could not be installed. This may mean that you have  requested an impossible situation or if you are using the unstable  distribution that some required packages have not yet been created  or been moved out of Incoming.  The following information may help to resolve the situation:    The following packages have unmet dependencies:   gsettings-desktop-schemas : Breaks: mutter (< 3.31.4) but 3.30.2-7 is to be installed  E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.  

When I try to run sudo apt full-upgrade, Another error:

 libc6-dev : Breaks: libgcc-8-dev (< 8.4.0-2~) but 8.3.0-6 is to be installed  E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.  

This is my /etc/apt/sources.list:

http://http.kali.org/kali kali-last-snapshot main non-free contrib  

And, ''apt-cache policy mutter'':

mutter:    Installed: 3.30.2-7    Candidate: 3.36.4-1    Version table:       3.36.4-1 500          500 http://http.kali.org/kali kali-rolling/main amd64 Packages   *** 3.30.2-7 100          100 /var/lib/dpkg/status  

Please Help. Is anything extra I had to Post?

System freeze on reboot/shutdown

Posted: 01 Apr 2021 08:48 AM PDT

My laptop is an Acer predator helios 300 with intel i7-7700hq and an NVIDIA GTX 1050ti. It had a 128GB NVME SSD and 1TB hard disk. I had dual boot on it with fedora 29 installed on the SSD and Mint Tessa installed on the Hard Disk. I deleted all the fedora partitions including the EFI partition from within mint using GParted. After that even Mint did not boot up. I tried to install Deepin OS 15.10 on the SSD and freed all the space on the HDD in the process. While the installation completed without an issue, it just freezes completely whenever I hit shutdown or restart. The exact same thing happens with Manjaro Deepin 18.0.2 as well as Elementary OS 5.0 Juno. I tried setting nouveau.modeset=0, acpi=off, acpi=noirq in /etc/default/grub and similar solutions people suggesting online. None of them worked. I then replaced the HDD with a Samsung 860 Evo 250 GB SATA SSD and tried to install Ubuntu 18.04 on it. Exact same thing as the previous three. Clean installation but freezes on reboot/shutdown.

1) I saw people claiming this to be a display driver issue. I am not sure but this seems unlikely as I had faced issues with the nouveau drivers earlier and those mostly led to blank screens on startup. I may be wrong here though.

2) This may be an issue with the UEFI bootloader as on rare occasions when the system does not freeze on pressing shut down immediately, it stops at Problem loading UEFI:db X.509 certificate (-65)

3) I tried some of the UEFI related options like enabling and disabling secure boot. To no avail.

Any help is very very welcome. I am not able to do any work as I don't want to hard shut down my laptop again and again.

date command in busybox not accepting formatted input date

Posted: 01 Apr 2021 06:39 AM PDT

I want to set the date using busybox's date command (BusyBox v1.21.0). My custom date to which I want to set the computer is of this form:

Tue, 15 Jan 2019 10:46:13 GMT  

What my date command is capable of is to print out the date in the same format using this string:

date +"%a, %d %b %Y %T %Z"

It returns the date in the exact same format as above. But It would not accept this when I use the -s option to set the date.

This fails for example:

date -u +"%a, %d %b %Y %T %Z" -s "Wed, 17 Feb 2010 19:14:32 UTC"  date: invalid date 'Wed, 17 Feb 2010 19:14:32 UTC'  

I know busybox commands are reduced in function, but I imagined that when it can handle the format string to print the current date in the desired form, then it should also be able to use it to interpret an input string.

How to identify window by clicking in Wayland

Posted: 01 Apr 2021 09:34 AM PDT

I'd like to identify which process a window belongs to in Wayland. Is there anything like xprop for X that allows the user to pick a window by clicking and outputs all window details, including PID?

After logging in and downloading cookies using --cookie-jar, how do we use the downloaded cookies to access the page again?

Posted: 01 Apr 2021 07:01 AM PDT

I used the command below to download cookie using CURL in bash. How do I use this file (cookies.txt) to access the page?

curl -u username --cookie cookies.txt --cookie-jar cookies.txt https://example.com  

Kali Linux gray screen when booting

Posted: 01 Apr 2021 09:02 AM PDT

I've just installed Kali Linux 2016.1. The installation was successful at first, the Grub worked normally.

But after that, quite often, when I boot I can't see the Grub screen, after a few seconds, I automatically enter the login screen of Linux, but half of the screen was static and become grayer and grayer, when I enter the root user and password, it's still login, but the screen now was fuzzing up and becomes grayer and grayer and I can't do anything with this.

I can't even access the BIOS (the words "Press ESC to enter BIOS", which normally appear when I start computer doesn't show up).

Sometimes I can enter Grub normally, but when I use Kali Linux, sometimes, a black screen appears in a second and then it returns to the normal screen.

I tried to search, but doesn't find any suitable solution.

I'm using HP Elitebook 8460.

How to tell which WINEPREFIX is in use

Posted: 01 Apr 2021 06:50 AM PDT

Is there a command to see which wineprefix is currently active when I run wine?

Failover default route on primary link outage

Posted: 01 Apr 2021 10:00 AM PDT

I have 2 ISPs, and a server with two IP addresses, something like this:

eth0: 161.0.0.2  eth1: 171.0.0.2  

I have set www.example.com with two A records, so that I have DNS LB.

App is working fine this way, and Linux box is set with policy based routing to avoid asymmetric routing of connections. Outgoing packets leave through same interface incoming connections were established through.

Now, only problem left is that I have set a single default gateway, 161.0.0.1. I would like to achieve either LB or at least failover for outgoing connections too.

One way I could do it is with cronjob that will ping some host and if ping fails, change the default route to 171.0.0.1, but this method seems way too unreliable.

Any suggestions on how to failover default route?

Duplex printing options using lp or lpr

Posted: 01 Apr 2021 09:59 AM PDT

The default options for a Brother MFC-9340CDW printer, are reportedly (e.g. querried via lpoptions -l) set to:

PageSize/Media Size: *A4 Letter Legal Executive A5 A6 B5 JISB5 JISB6 EnvDL EnvC5 Env10 EnvMonarch Br3x5 FanFoldGermanLegal EnvPRC5Rotated Postcard EnvYou4 EnvChou3 210x270mm 195x270mm 184x260mm 197x273mm  BRDuplex/Two-Sided: DuplexTumble *DuplexNoTumble None  BRInputSlot/Paper Source: AutoSelect *Tray1 Manual  BRResolution/Print Quality: 600dpi *600x2400dpi  BRMonoColor/Color / Mono: Auto FullColor *Mono  BRMediaType/Media Type: *Plain Thin Thick Thicker BOND Env EnvThick EnvThin Recycled Label Glossy PostCard  BRColorMatching/Color Mode: *Normal Vivid None  BRGray/Improve Gray Color: OFF *ON  BREnhanceBlkPrt/Enhance Black Printing: OFF *ON  BRTonerSaveMode/Toner Save Mode: OFF *ON  BRImproveOutput/Improve Print Output: OFF *BRLessPaperCurl BRFixIntensity  BRSkipBlank/Skip Blank Page: *OFF ON  BRBrightness/Brightness: -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 *0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  BRContrast/Contrast: -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 *0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  BRRed/Red: -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 *0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  BRGreen/Green: -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 *0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  BRBlue/Blue: -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 *0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  BRSaturation/Saturation: -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 *0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  

Though a simple lp(r) command should make use of the default options, duplex printing does not work as expected, e.g., the option *DuplexNoTumble should result in a double sided print of the document so as to turn the paper along its long edge. The result, however, for a PDF document, is a DuplexTumble one!

Even manually setting the options of interest in the command line directly does not complete as expected, e.g.

lp -o PageSize=A4 -o BRDuplex=DuplexNoTumble -o BRInputSlot=Tray1 -o BRResolution=600dpi -o BRMonoColor=Auto -o BRMediaType=Plain -o BRColorMatching=Normal -o BRTonerSaveMode=ON -o BRImproveOutput=BRLessPaperCurl SomeDocument.pdf  

prints a Short-Edge binded print-out.

Strangely, setting the BRDuplex to None, gives the same Short-Edge Binding. There must be some configuration option set to "Short-Edge Binding" somwhere that overrides the lpoptions.

Where (else) are Duplex printing related options set?


Details

  • Printer: Model Name Brother MFC-9340CDW, Main Firmware Version K, Sub1 Firmware Version 1.02, Sub2 Firmware Version F1309271100
  • OS: Funtoo
  • Printer Driver Installed via https://github.com/NikosAlexandris/brother-overlay
  • The http://localhost:631/printers/Brother_MFC-9340CDW reports, however:
    • Driver: Brother MFC-9340CDW CUPS (color, 2-sided printing)
    • Connection: lpd://192.168.10.6/BINARY_P1
    • Defaults: job-sheets=none, none media=iso_a4_210x297mm sides=one-sided
  • Section of interest in the file Brother_MFC-9340CDW.ppd:
*%=== BRDuplex ================================  *OpenUI *BRDuplex/Two-Sided: PickOne  *OrderDependency: 25 AnySetup *BRDuplex  *DefaultBRDuplex: DuplexNoTumble  *BRDuplex DuplexTumble/Short-Edge Binding: "          "  *BRDuplex DuplexNoTumble/Long-Edge Binding: "          "  *BRDuplex None/Off: "          "  *CloseUI: *BRDuplex  

ssh-agent not getting set up (SSH_AUTH_SOCK, SSH_AGENT_PID env vars not set)

Posted: 01 Apr 2021 10:11 AM PDT

I set up a new user account for a friend on Kubuntu 12.04. When he uses ssh he gets this error:

Could not open a connection to your authentication agent

We're running ssh in some bash scripts.

After looking around at the wide variety of things that can lead to that error, I came across this solution:

$ eval `ssh-agent -s`  $ ssh-add ~/.ssh/some_id_rsa  

Then he can run the ssh commands (and bash scripts) as expected.

Before running those two commands, the env variables are not set in a terminal:

$ echo $SSH_AGENT_PID    $ echo $SSH_AUTH_SOCK    $   

After running the commands, the env variables are set as expected. However, they do not stay set (e.g., in a different shell or after rebooting).

I want to know how to set up his computer so he doesn't have to run those two commands to set the env variables. I do not need to run them on my computer (ever). So far I am not seeing what is different between our machines.

I see this info in the man page, but it does not tell me how Ubuntu is normally setting up the agent automatically or what is happening on my friend's machine so that this is not working for him.

There are two main ways to get an agent set up: The first is that the agent starts a new subcommand into which some environment variables are exported, eg ssh-agent xterm &. The second is that the agent prints the needed shell commands (either sh(1) or csh(1) syntax can be generated) which can be evalled in the calling shell, eg eval ssh-agent -s for Bourne-type shells such as sh(1) or ksh(1) and eval ssh-agent -c for csh(1) and derivatives.

After installing acct and rebooting, this is the output of lastcomm:

ssh-agent         F    newuser __         0.12 secs Wed Aug  7 11:02  ssh-agent         F    newuser __         0.00 secs Wed Aug  7 20:34  ssh-agent         F    newuser __         0.02 secs Wed Aug  7 20:02  ssh-agent         F    newuser __         0.01 secs Thu Aug  8 12:39  ssh-agent         F    newuser __         0.02 secs Thu Aug  8 07:45  

From the man page:

F -- command executed after a fork but without a following exec

I'm not sure if that is significant.

lrzsz doesn't working in my Mac OS X

Posted: 01 Apr 2021 08:04 AM PDT

When I was used secureCRT in Windows, I often used sz and rz to transfer files between my linux server and client machine. But I can't use that way in iterm2 in MacOS X. lrzsz package has installed in my linux server(ubuntu 13.04)
But,

benjamin@my-ubuntu-13-04:~$ rz
�z waiting to receive.**B0100000023be50

The terminal client got a hang. What's the problem?

No comments:

Post a Comment