Friday, July 2, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Service not starting, but no errors are being generated to show why they're not starting

Posted: 02 Jul 2021 10:45 AM PDT

OpenVAS has been quite a nightmare to get installed and running successfully and consistently on Kali. I understand there's a docker image for that and what not, but still.

The issue I'm facing is the ospd-openvas service is not starting when I run it manually, although it starts when I run gvm-check-setup, even though it's running the exact same systemctl start ospd-openvas command.

___(root__docker-desktop)-[~]  __# systemctl status ospd-openvas  ospd-openvas.service - OpenVAS Wrapper of the Greenbone Vulnerability Management (ospd-openvas)      Loaded: loaded (/usr/lib/systemd/system/ospd-openvas.service, disabled)      Active: inactive (dead)    ___(root__docker-desktop)-[~]  __# systemctl start ospd-openvas    ___(root__docker-desktop)-[~]  __# systemctl status ospd-openvas  ospd-openvas.service - OpenVAS Wrapper of the Greenbone Vulnerability Management (ospd-openvas)      Loaded: loaded (/usr/lib/systemd/system/ospd-openvas.service, disabled)      Active: inactive (dead)  

but if I run it with gvm-check-setup, then it works fine:

Step 6: Checking Greenbone Security Assistant (GSA) ...  Oops, secure memory pool already initialized          ERROR: Greenbone Security Assistant too old or too new: 21.4.1~dev1          FIX: Please install Greenbone Security Assistant >= 21.04.          OK: Greenbone Security Assistant is present in version 21.4.1~dev1.  Step 7: Checking if GVM services are up and running ...          Starting ospd-openvas service          Waiting for ospd-openvas service          OK: ospd-openvas service is active.          Starting gvmd service          Waiting for gvmd service          OK: gvmd service is active.          Starting greenbone-security-assistant service          Waiting for greenbone-security-assistant service          OK: greenbone-security-assistant service is active.  Step 8: Checking few other requirements...          OK: nmap is present in version 21.4.1~dev1.          OK: ssh-keygen found, LSC credential generation for GNU/Linux targets is likely to work.          WARNING: Could not find makensis binary, LSC credential package generation for Microsoft Windows targets will not work.          SUGGEST: Install nsis.          OK: xsltproc found.          WARNING: Your password policy is empty.          SUGGEST: Edit the /etc/gvm/pwpolicy.conf file to set a password policy.    It seems like your GVM-21.4.1 installation is OK.    ___(root__docker-desktop)-[~]  __# systemctl status ospd-openvas  ospd-openvas.service - OpenVAS Wrapper of the Greenbone Vulnerability Management (ospd-openvas)      Loaded: loaded (/usr/lib/systemd/system/ospd-openvas.service, disabled)      Active: active (running)  

How do I actually troubleshoot why this service isn't being started when I try starting it? I've tailed the entire /var/log/gvm/* folder with tail -f, and it doesn't seem like nothing is being generate there. There is also nothing in journalctl -xe as it says "-- No entries --".

enter image description here

How rm command free up disk space?

Posted: 02 Jul 2021 10:44 AM PDT

I'm trying to understand how rm command works and get this one:

The rm command removes the entry of specified file from indexing. Since file is removed, Linux marks the block where the file was stored as free and makes it available for new file. While storing a new file in disk, Linux uses indexing to find the free blocks. If a block is marked as free in indexing, it is used to store the new data regardless what it contains.

From technical point of view, no, a deleted file persists in the disk until a new file or folder is stored at the same place where the file was stored.

As it said, how I get more free disk space each time using rm command?

remap vim CTRL-a to CTRL-i

Posted: 02 Jul 2021 10:44 AM PDT

I need to adjust vim to count in visual block mode. See this post for more info: I use Ctrl+a for my tmux binding (replaces Ctrl+b), and that is not going to change.

I tried everything here. Nothing seems to work. I think vim is taking my key combo, and still trying to run Ctrl+a. I need to completely make vim start using a different key combination for the same thing that Ctrl+a did.

nnoremap, noremap, vmap. Every time I try {visual block mode} + g + {new binding}. Nothing happens.

I tested outside of tmux btw.

Connection timeout when using Linux box as gateway to share VPN

Posted: 02 Jul 2021 10:21 AM PDT

I am trying to setup Linux machine (192.168.1.47) as a gateway so that I can share VPN connection with another machine (192.168.1.12). Both of the machines are Ubuntu VirtualBox VMs setup on different machines (bridged connection). I have the following setup but I cannot access most websites.

Gateway Machine:

root@pi:~# iptables -L  Chain INPUT (policy ACCEPT)  target     prot opt source               destination  ACCEPT     all  --  unn-89-187-175-12.cdn77.com  anywhere  ACCEPT     all  --  192.168.1.0/24       anywhere    Chain FORWARD (policy ACCEPT)  target     prot opt source               destination  NFLOG      all  --  anywhere             anywhere             nflog-group 6  ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED  ACCEPT     all  --  anywhere             anywhere    Chain OUTPUT (policy ACCEPT)  target     prot opt source               destination  ACCEPT     all  --  anywhere             unn-89-187-175-12.cdn77.com  ACCEPT     all  --  anywhere             192.168.1.0/24  

root@pi:~# iptables -L -t nat  Chain PREROUTING (policy ACCEPT)  target     prot opt source               destination    Chain INPUT (policy ACCEPT)  target     prot opt source               destination    Chain OUTPUT (policy ACCEPT)  target     prot opt source               destination    Chain POSTROUTING (policy ACCEPT)  target     prot opt source               destination  MASQUERADE  all  --  anywhere             anywhere  

root@pi:~# route -n  Kernel IP routing table  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface  0.0.0.0         10.5.0.2        128.0.0.0       UG    0      0        0 nordlynx  0.0.0.0         192.168.1.1     0.0.0.0         UG    100    0        0 enp0s3  128.0.0.0       10.5.0.2        128.0.0.0       UG    0      0        0 nordlynx  192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 enp0s3  192.168.1.1     0.0.0.0         255.255.255.255 UH    100    0        0 enp0s3  

Client:

root@piclient:~# route -n  Kernel IP routing table  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface  0.0.0.0         192.168.1.47    0.0.0.0         UG    0      0        0 enp0s3  192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 enp0s3  

From the client machine, I an reach example.com and icanhazip.com but can't reach google.com and other websites (curl: connection timeout with ipv4). Even ping to 8.8.8.8 works fine. Using the nflog I can see the traffic which is successfully being sent across the gateway machine (mostly DNS/ping). As you can see below client is able to resolve google.com but I don't see follow-up TCP request like it does with example.com.

root@pi:~# tcpdump -s 0 -n -i nflog:6  tcpdump: verbose output suppressed, use -v or -vv for full protocol decode  listening on nflog:6, link-type NFLOG (Linux netfilter log messages), capture size 262144 bytes  16:26:51.578039 IP 192.168.1.12.50342 > 8.8.8.8.53: 56494+ A? google.com. (28)  16:26:51.578135 IP 8.8.8.8.53 > 192.168.1.12.50342: 56494 6/13/10 A 173.194.199.101, A 173.194.199.102, A 173.194.199.113, A 173.194.199.139, A 173.194.199.138, A 173.194.199.100 (508)  
  • What can I do to debug further?
  • Is it possible the router (192.168.1.1) or the host machines of the VMs are interfering? If so, why does it not interfere with example.com?

curl: (35) Encountered end of file

Posted: 02 Jul 2021 10:41 AM PDT

First, search the avaliable java version:

[root@izbp19pke6x0v6ruecuy1yz ~]# sdk list java  ================================================================================  Available Java Versions  ================================================================================   Vendor        | Use | Version      | Dist    | Status     | Identifier  --------------------------------------------------------------------------------   AdoptOpenJDK  |     | 16.0.1.j9    | adpt    |            | 16.0.1.j9-adpt                       |     | 16.0.1.hs    | adpt    |            | 16.0.1.hs-adpt                       |     | 11.0.11.j9   | adpt    |            | 11.0.11.j9-adpt                      |     | 11.0.11.hs   | adpt    |            | 11.0.11.hs-adpt                      |     | 8.0.292.j9   | adpt    |            | 8.0.292.j9-adpt                      |     | 8.0.292.hs   | adpt    |            | 8.0.292.hs-adpt        Alibaba       |     | 11.0.9.4     | albba   |            | 11.0.9.4-albba                       |     | 8.5.5        | albba   |            | 8.5.5-albba            Amazon        |     | 16.0.1.9.1   | amzn    |            | 16.0.1.9.1-amzn                      |     | 11.0.11.9.1  | amzn    |            | 11.0.11.9.1-amzn                     |     | 8.292.10.1   | amzn    |            | 8.292.10.1-amzn        Azul Zulu     |     | 16.0.1       | zulu    |            | 16.0.1-zulu                          |     | 16.0.1.fx    | zulu    |            | 16.0.1.fx-zulu                       |     | 11.0.11      | zulu    |            | 11.0.11-zulu                         |     | 11.0.11.fx   | zulu    |            | 11.0.11.fx-zulu                      |     | 8.0.292      | zulu    |            | 8.0.292-zulu                         |     | 8.0.292.fx   | zulu    |            | 8.0.292.fx-zulu                      |     | 7.0.302      | zulu    |            | 7.0.302-zulu                         |     | 6.0.119      | zulu    |            | 6.0.119-zulu           BellSoft      |     | 16.0.1.fx    | librca  |            | 16.0.1.fx-librca                     |     | 16.0.1       | librca  |            | 16.0.1-librca                        |     | 11.0.11.fx   | librca  |            | 11.0.11.fx-librca                    |     | 11.0.11      | librca  |            | 11.0.11-librca                       |     | 8.0.292.fx   | librca  |            | 8.0.292.fx-librca                    |     | 8.0.292      | librca  |            | 8.0.292-librca         GraalVM       |     | 21.1.0.r16   | grl     |            | 21.1.0.r16-grl                       |     | 21.1.0.r11   | grl     |            | 21.1.0.r11-grl                       |     | 21.1.0.r8    | grl     |            | 21.1.0.r8-grl                        |     | 21.0.0.2.r11 | grl     |            | 21.0.0.2.r11-grl                     |     | 21.0.0.2.r8  | grl     |            | 21.0.0.2.r8-grl                      |     | 20.3.2.r11   | grl     |            | 20.3.2.r11-grl                       |     | 20.3.2.r8    | grl     |            | 20.3.2.r8-grl                        |     | 20.3.1.2.r11 | grl     |            | 20.3.1.2.r11-grl                     |     | 20.3.1.2.r8  | grl     |            | 20.3.1.2.r8-grl                      |     | 19.3.6.r11   | grl     |            | 19.3.6.r11-grl                       |     | 19.3.6.r8    | grl     |            | 19.3.6.r8-grl                        |     | 19.3.5.r11   | grl     |            | 19.3.5.r11-grl                       |     | 19.3.5.r8    | grl     |            | 19.3.5.r8-grl          Java.net      |     | 18.ea.4      | open    |            | 18.ea.4-open                         |     | 18.ea.3      | open    |            | 18.ea.3-open                         |     | 18.ea.2      | open    |            | 18.ea.2-open                         |     | 18.ea.1      | open    |            | 18.ea.1-open                         |     | 17.ea.29     | open    |            | 17.ea.29-open                        |     | 17.ea.28     | open    |            | 17.ea.28-open                        |     | 17.ea.27     | open    |            | 17.ea.27-open                        |     | 17.ea.26     | open    |            | 17.ea.26-open                        |     | 17.ea.25     | open    |            | 17.ea.25-open                        |     | 17.ea.7.lm   | open    |            | 17.ea.7.lm-open                      |     | 17.ea.3.pma  | open    |            | 17.ea.3.pma-open                     |     | 16.0.1       | open    |            | 16.0.1-open                          |     | 11.0.11      | open    |            | 11.0.11-open                         |     | 11.0.10      | open    |            | 11.0.10-open                         |     | 11.0.2       | open    |            | 11.0.2-open                          |     | 8.0.292      | open    |            | 8.0.292-open                         |     | 8.0.282      | open    |            | 8.0.282-open                         |     | 8.0.265      | open    |            | 8.0.265-open           Mandrel       |     | 21.1.0.0     | mandrel |            | 21.1.0.0-mandrel                     |     | 20.3.2.0     | mandrel |            | 20.3.2.0-mandrel       Microsoft     |     | 16.0.1.9.1   | ms      |            | 16.0.1.9.1-ms                        |     | 11.0.11.9.1  | ms      |            | 11.0.11.9.1-ms         SAP           |     | 16.0.1       | sapmchn |            | 16.0.1-sapmchn                       |     | 11.0.11      | sapmchn |            | 11.0.11-sapmchn        TravaOpenJDK  |     | 11.0.9       | trava   |            | 11.0.9-trava                         |     | 8.0.232      | trava   |            | 8.0.232-trava         ================================================================================  Use the Identifier for installation:        $ sdk install java 11.0.3.hs-adpt  ================================================================================  

When I am using sdkman to install jdk,shows this error:

[root@izbp19pke6x0v6ruecuy1yz ~]# sdk install java 11.0.11.hs-adpt    Downloading: java 11.0.11.hs-adpt    In progress...    ######################################################################## 100.0%  curl: (35) Encountered end of file  Download has failed, aborting!    Can not install java 11.0.11.hs-adpt at this time...  

what should I do to fix it? This is my sdkman version:

[root@izbp19pke6x0v6ruecuy1yz ~]# sdk version    SDKMAN 5.11.6  

Always prefer dnf over yum?

Posted: 02 Jul 2021 10:41 AM PDT

Similar to this question I'm wondering if the following is true:

If you have both dnf and yum available to you, always prefer to use dnf over yum, because dnf was intended to replace yum.

(Difference between this question and the linked one, is I'm wondering if one is preferred, not just what the differences are. I'm also asking independent of which linux flavor you are using)

How is journalctl able to add the line with the "-- Reboot --" log message?

Posted: 02 Jul 2021 09:52 AM PDT

I've noticed, on machines where the journalctl logs are saved on disk, that on a reboot, I get a line between the message before and after the reboot happened like so:

blah  blah  blah  -- Reboot --  blah  blah  blah  

How does journalctl know to add that line at that location?

Bluetooth Problems

Posted: 02 Jul 2021 09:15 AM PDT

I have a Kali Linux and windows dual-boot Bluetooth is working in windows and at the same time when i boot up Kali blootoothctl it tells me that no default controller available what could be the problem.

VM cannot communicate with host on a given port

Posted: 02 Jul 2021 09:08 AM PDT

I'm doing some sort of school project where i have to make my vm (using virtualbox for hosting the vm) communicate with my host pc using port 6969.

The problem is that even after all the things I tried to open this particular port, the vm still says connection refused. I'm using bridge adapter, the vm is a linux one, and my host is manjaro. I cannot do any sudoer thing on the vm, it's mounted on an iso given by the school that is sure to be working fine (no one besides me had any problem with it) but is not giving me any admin rights.

Ssh connection are fine though, here are a few commands I ran on the vm :

$> nc -zvw10 192.168.1.40 6969  nc: connect to 192.168.1.40 port 6969 (tcp) failed: Connection refused  
$> nc -zvw10 192.168.1.40 22  Connection to 192.168.1.40 22 port [tcp/ssh] succeeded!  

And my opened and flushed iptables on host side :

$> sudo iptables -L  Chain INPUT (policy ACCEPT)  target     prot opt source               destination             Chain FORWARD (policy ACCEPT)  target     prot opt source               destination             Chain OUTPUT (policy ACCEPT)  target     prot opt source               destination  

Tried setting new rules on iptable using

sudo iptables -A INPUT -p tcp --dport 6969 -j ACCEPT  sudo systemctl restart iptables  

Tried using Gufw (gui for ufw) for setting new rules, no more success.

Any idea on things to try would help me so much. Thanks for reading.

Remove all sub-fields in column-organized datafile that contain "_XX"

Posted: 02 Jul 2021 09:36 AM PDT

I have this type of file

#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO  chr1    69511   rs2691305       A       G       .       PASS    AC=70482;AN=83312;AF=0.846001;popmax=eas;faf95_popmax=0.975176;AC_non_v2_XX=28734;AN_non_v2_XX=33774;AF_non_v2_XX=0.850773;nhomalt_non_v2_XX=13253;AC_non_cancer_fin_XX=1080;AN_non_cancer_fin_XX=1090;AF_non_cancer_fin_XX=0.990826;nhomalt_non_cancer_fin_XX=537;AC_non_neuro_nfe=32992;AN_non_neuro_nfe=34106;AF_non_neuro_nfe=0.967337;nhomalt_non_neuro_nfe=16243;AC_non_neuro_afr_XY=5275;AN_non_neuro_afr_XY=8862;AF_non_neuro_afr_XY=0.595238;nhomalt_non_neuro_afr_XY=1908;AC_non_neuro_nfe_XY=13529;AN_non_neuro_nfe_XY=13954;AF_non_neuro_nfe_XY=0.969543;nhomalt_non_neuro_nfe_XY=6668;AC_controls_and_biobanks_eas_XY=1209;AN_controls_and_biobanks_eas_XY=1210;AF_controls_and_biobanks_eas_XY=0.999174;nhomalt_controls_and_biobanks_eas_XY=604;AC_non_neuro_sas_XX=623;AN_non_neuro_sas_XX=646;AF_non_neuro_sas_XX=0.964396;nhomalt_non_neuro_sas_XX=304;AC_non_v2=53211;AN_non_v2=62346;AF_non_v2=0.853479;nhomalt_non_v2=24615;AC_non_topmed_nfe_XX=4123;AN_non_topmed_nfe_XX=4274;AF_non_topmed_nfe_XX=0.96467;nhomalt_non_topmed_nfe_XX=2022;AC_non_v2_mid=132;AN_non_v2_mid=146;AF_non_v2_mid=0.90411;nhomalt_non_v2_mid=63;AC_non_topmed_sas=2561;AN_non_topmed_sas=2620;AF_non_topmed_sas=0.977481;nhomalt_non_topmed_sas=1262;AC_non_cancer_eas_XX=1882;AN_non_cancer_eas_XX=1882;AC_nfe=34637;AN_nfe=35806;AF_nfe=0.967352;nhomalt_nfe=17050;AC_popmax=4423;AN_popmax=4424;AF_popmax=0.999774;nhomalt_popmax=2211;faf95_sas=0.945756;faf99_sas=0.93297;faf95_eas=0.975176;faf99_eas=0.965135;faf95_amr=0.876957;faf99_amr=0.869526;faf95_afr=0.586993;faf99_afr=0.583779;faf95=0.840765;faf99=0.838605;faf95_nfe=0.958818;faf99_nfe=0.955301;age_hist_het_bin_freq=123|146|149|217|287|242|200|187|124|72;age_hist_het_n_smaller=460;age_hist_het_n_larger=24;age_hist_hom_bin_freq=569|655|765|1405|2028|1746|1691|1518|1005|654;age_hist_hom_n_smaller=1206;age_hist_hom_n_larger=215;FS=0;MQ=41.6849;MQRankSum=-3.98;QD=26.0414;ReadPosRankSum=0.51;VarDP=1761397;QUALapprox=45869299;AS_FS=0;AS_MQ=41.6847;AS_MQRankSum=-3.972;AS_pab_max=1;AS_QD=26.0413;AS_ReadPosRankSum=0.51;AS_SOR=0.865485;InbreedingCoeff=0.521183;AS_SB_TABLE=99037,96244|856526,709549;AS_VQSLOD=0.4266;AS_culprit=AS_MQRankSum;NEGATIVE_TRAIN_SITE;allele_type=snv;n_alt_alleles=2;variant_type=multi-snv;segdup;gq_hist_alt_bin_freq=0|0|0|0|39|89|5016|5173|2494|4247|3343|1353|2059|1764|858|1286|1197|599|785|7691;gq_hist_all_bin_freq=0|0|0|0|2833|660|5232|5237|2506|4249|3343|1354|2060|1764|859|1287|1197|599|785|7691;dp_hist_alt_bin_freq=0|0|12706|9449|5594|4053|2707|1532|828|486|262|166|89|45|36|12|6|7|2|3;dp_hist_alt_n_larger=10;dp_hist_all_bin_freq=0|0|13838|11344|6042|4209|2735|1535|828|487|262|166|89|45|36|12|6|7|2|3;dp_hist_all_n_smaller=0;dp_hist_all_n_larger=10;ab_hist_alt_bin_freq=0|0|0|0|193|367|513|688|876|676|772|504|439|263|124|56|25|8|0|0;cadd_raw_score=0.112916;cadd_phred=2.209;revel_score=0.053;splice_ai_max_ds=0.02;splice_ai_consequence=donor_gain;primate_ai_score=0.632586;vep=G|missense_variant|MODERATE|OR4F5|ENSG00000186092|Transcript|ENST00000335137|protein_coding|1/1||ENST00000335137.4:c.421A>G|ENSP00000334393.3:p.Thr141Ala|457|421|141|T/A|Aca/Gca|1||1|SNV||HGNC|HGNC:14825|YES||P1|CCDS30547.1|ENSP00000334393|||||tolerated(0.820)|benign(0.000)|Gene3D:1&Pfam:PF13853&PROSITE_profiles:PS50262&Superfamily:SSF81321&Transmembrane_helices:TMhelix&CDD:cd15226|||||||||,G|missense_variant|MODERATE|OR4F5|ENSG00000186092|Transcript|ENST00000641515|protein_coding|3/3||ENST00000641515.2:c.484A>G|ENSP00000493376.2:p.Thr162Ala|544|484|162|T/A|Aca/Gca|1||1|SNV||HGNC|HGNC:14825|||||ENSP00000493376|||||tolerated(0.850)|benign(0.000)|Transmembrane_helices:TMhelix&CDD:cd15226&PANTHER:PTHR26451&PANTHER:PTHR26451&Pfam:PF13853&PROSITE_profiles:PS50262&Gene3D:1&Superfamily:SSF81321|||||||||,G|missense_variant|MODERATE|OR4F5|79501|Transcript|NM_001005484.1|protein_coding|1/1||NM_001005484.1:c.421A>G|NP_001005484.1:p.Thr141Ala|421|421|141|T/A|Aca/Gca|1||1|SNV||EntrezGene|HGNC:14825|YES||||NP_001005484.1|||||tolerated(0.820)|benign(0.000)||||||||||  

and all the strings containing _XX between semicolons should be removed, so that from

AF_controls_and_biobanks_eas_XY=0.999174;nhomalt_controls_and_biobanks_eas_XY=604;AC_non_neuro_sas_XX=623;AN_non_neuro_sas_XX=646;  

only

AF_controls_and_biobanks_eas_XY=0.999174;nhomalt_controls_and_biobanks_eas_XY=604;  

stays.

I tried to use sed, but unsucesfully:

s/[^ ]*_XX[^ ]*//ig    sed -e 's/[^ ]*_XX[^ ]*//ig'    sed '/^_XX/s//'       sed 's/*XX//'     sed 's/^[0-9]*_XX|//'    sed 's/;.*_XX//'  

Any help will be appreciated to save my life.

Thank you!

Problems with Wifi connection (RTL8723bs_nic.bin) Kali Linux

Posted: 02 Jul 2021 08:54 AM PDT

I installed Kali Linux (2021.2 32bit Installer) on a laptop without ethernet. During the installation process it says

The missing firmware files are: rtlwifi/rtl8723bs_nic.bin  

Upon trying to install Kali Linux (2021 W26 32bit) it gives the same error.

I've managed to complete the installation without the firmware and get into the desktop environment (on 2021.2).

When I run sudo dmesg I get

[9.308550] bluetooth hci0: firmware: failed to load rtl_bt/rtl8723bs_fw.bin (-2)  [9.309141] bluetooth hci0: Direct firmware load for rtl_bt/rtl8723bs_fw.bin failed with error -2  [9.309163] Bluetooth: hci0: RTL: firmware file rtl_bt/rtl8723bs_fw.bin not found  

I've found the firmware but I'm not sure how to import it.

How to forward gpg-agent from host to docker container and reuse cached passphrase?

Posted: 02 Jul 2021 08:54 AM PDT

Information:

GPG version: 2.2.23  Docker version 20.10.5  

I am playing around with GPG on my laptop and trying to reuse it inside docker container.

The docker container is simply a PHP-FPM alpine image. I have simple PHP CLI tool which encrypt/decrypts data with GPG. I exported the GPG from host and imported it inside container. The problem though, I always need to provide passphrase for PHP to decrypt the data. I would like to avoid passphrase in container for sake of security.

Further I discovered the gpg-agent with gpg-preset-passphrase and preconfigured it inside the container, but later on found that this isn't optimal, because once I restart the container or destroy it, I will need to start gpg-agent and set passphrase again.

So, I was wondering, is there a way to pass gpg-agent with cached passphrase inside docker and so docker would reuse it to encrypt/decrypt the data?

I know there is possibility to reuse ssh-agent inside docker, but couldn't really find a way to do the same for GPG.

Or maybe there is a better/secure way of doing it?

Kernel files missing in Fedora 34

Posted: 02 Jul 2021 10:46 AM PDT

[VMware WS 16 VM, Linux Mint 20.1 host]

At some point in the last couple of days, Fedora 34 upgraded its 5.12 kernel branch to 5.12.13-300. However, on my system, I'm missing most of the files and I have no idea why.

Here's a list of what's installed in /boot from the previous (still-installed) kernel 5.12.10:

.vmlinuz-5.12.10-300.fc34.x86_64.hmac  config-5.12.10-300.fc34.x86_64  initramfs-5.12.10-300.fc34.x86_64.img  System.map-5.12.10-300.fc34.x86_64  vmlinuz-5.12.10-300.fc34.x86_64  

All I'm showing for the 5.12.13 kernel branch is:

initramfs-5.12.13-300.fc34.x86_64.img  

According to dnf, the packages have been installed:

$ rpm -qa | grep kernel | grep 5.12.13  kernel-modules-5.12.13-300.fc34.x86_64  kernel-5.12.13-300.fc34.x86_64  kernel-modules-extra-5.12.13-300.fc34.x86_64  kernel-headers-5.12.13-300.fc34.x86_64  kernel-devel-5.12.13-300.fc34.x86_64  kernel-core-5.12.13-300.fc34.x86_64  

I've tried reinstalling all of these, but nothing changes. I can't remove them - too many dependencies are targeted for removal.

This is not a space issue - single root BTRFS filesystem with 42+ GB free. Is this fixable or should I just rebuild?

UPDATE: same thing is happening when reinstalling an older kernel branch (v5.11). I was able to find the files in /usr/lib/modules and copy them to /boot. I just finished testing all (3) kernels and they boot fine; why the post-install scripts aren't working is beyond me.

UPDATE #2: I had installed python3-dnf-plugin-post-transaction-actions-4.0.22-1.fc34.noarch, but left it unconfigured. This is the only package I've added in the past week.

Konsole does not have permission to save this profile to /home/aravindakrishnan/.local/share/konsole/Profile 2.profile

Posted: 02 Jul 2021 09:14 AM PDT

I'm using KDE Neon on Debian. When I'm trying to change my profile It says Konsole does not have permission to save this profile to /home/username/.local/share/Konsole/Profile 2.profile:

screenshot of the error

ls -l /home/aravindakrishnan/.local/share/konsole/Profile*    -rw------- 1 mongodb mongodb 1645 May  5 18:56 '/home/aravindakrishnan/.local/share/konsole/Profil    ls -ld  /home/aravindakrishnan/.local/share/konsole/ /home/aravindakrishnan/.local/share/ /home/aravindakrishnan/.local/    drwxrwxr-x  5 mongodb mongodb 4096 May  5 19:15 /home/aravindakrishnan/.local/  drwxrwxr-x 37 mongodb mongodb 4096 Jun 28 11:14 /home/aravindakrishnan/.local/share/  drwxrwxr-x  2 mongodb mongodb 4096 May  5 18:56 /home/aravindakrishnan/.lo    

Does checkinstall command add dependencies in the package?

Posted: 02 Jul 2021 09:18 AM PDT

I learned about checkinstall today. I installed mdp on Linux Lite installed on VirtualBox using checkinstall.

mdp depends on a package called libncursesw5-dev, which wasn't installed on my machine. But when I ran checkinstall, mdp was installed and worked flawlessly.

So, here's what I need to know from you, does checkinstall install the dependencies and pack it in the .deb, .rpm, etc. files?

NOTE: And yes, since I'm using Linux Lite on VirtualBox, I took a snapshot of the machine and used make instead of checkinstall, and make threw an error to install the dependencies first.

How to attach a listener to sysfs files?

Posted: 02 Jul 2021 10:16 AM PDT

How to watch for sysfs file changes (like /sys/class/net/eth0/statistics/operstate) and execute a command on content change?

  • inotify does not work on sysfs
  • I don't want to poll. I want to set a listener with a callback routine once

Rsync a list of files into a single directory

Posted: 02 Jul 2021 09:49 AM PDT

I have a list of files that are in various directories on a remote machine that I want to rsync to a single directory on my local machine.

For an individual file user@remote:dir1/dir2/file1 ~/local does what I want; i.e. ~/local/file1

If I use --files-from then it creates the directory structure giving me ~local/dir1/dir2/file1 which I don't want.

n.b. I am aware that duplicate file names from different directories would cause files to be overwritten in ~/local

__USE_POSIX and VS Code in WSL distro

Posted: 02 Jul 2021 10:04 AM PDT

I'm learning C and in general I code with VS Code in Ubuntu. For convenience, I'm trying to migrate my learning materials to Windows where a lot of my other works happen, so I installed WSL 2 and its distro Ubuntu 18.04 LTS. After installing VS Code for Windows and its remote extension to work with WSL, I boot up a new WSL session in VS Code, install the C/C++ extension with IntelliSense then write a simple program like below just for demonstration:

#include <signal.h>    int main()  {      kill(-1, SIGKILL);  }  

The problem with VS Code is that while the program compiles, its IntelliSense doesn't detect the kill function in the signal.h header. By further investigating the header file, I observe that the following part is darkened

#ifdef __USE_POSIX  extern int kill (__pid_t __pid, int __sig) __THROW;  

No comments:

Post a Comment