Recent Questions - Unix & Linux Stack Exchange |
- Zsh - pasting text killed in a custom widget only works for last word, can that be fixed?
- I have a mis-behaving network manager, fed34
- Why can't I enable SSH on several ports?
- Is it possible to encrypt sensitive data on a headless embedded device in a secure way?
- Track CPU load of a process
- Nginx Serve Up 8443 Application over 443
- Unlock GRUB bootloader password remotely
- How to passthrough GPU in QEMU-KVM? Failing to start
- Replacing columns using awk
- Linux Mint: Read only file system error
- Share the internet of one WiFi card through a hotspot of another WiFi card
- Setting which ports to use for passive FTP connection with Linux's ftp client
- Fully unattended Windows 10 installation in KVM
- Extend partition size on the left
- How to filter for only unique errors in multiple logs using grep?
- How to "split" an attachment with Mutt ? (Message/partial)
- How can I email a terminal session typescript without raw data?
- hylafax probemodem fails to autodetect USB modem for adding a modem
- How do you set --author and --message for the image using buildah?
- How do I change the icon on an app installed as a "flatpak"?
- rsync could not find xattr #1 for {file}... error in rsync protocol data stream
- Sed to print out the line number
- GNOME: Different PAM configurations for lockscreen vs login
- Allow user to run PHP-FPM without password using sudoers
- Error when building Apache 2.4.25 from source with open ssl 1.1.0c
- How can I have two keystrokes to delete to either a slash or a word in zsh?
- Verify that partition is encrypted
- CP: max source files number arguments for copy utility
- How to determine Linux kernel architecture?
- What is Fedora's equivalent of 'apt-get purge'?
Zsh - pasting text killed in a custom widget only works for last word, can that be fixed? Posted: 20 Jul 2021 10:14 AM PDT I'm using answers from this question so that I can cut longer/shorter parts of text when I press Ctrl+W or Alt+Backspace respectively. Specifically I have this in my .zshrc to add the Alt+Backspace behavior (Ctrl+W is built-in) This works fine for killing text, but then pasting it doesn't work as expected. Let's say I have this text: If I press Ctrl+W four times and then press Ctrl+Y, the entire text will be cut and then pasted back. But if I have this text: and I press Alt+Backspace four times and then Ctrl+Y, it will cut the text as expected but only paste "a-". How can I make the latter also paste the entire text? |
I have a mis-behaving network manager, fed34 Posted: 20 Jul 2021 10:18 AM PDT I have a miss behaving network manager on Fed34 but I had the same problem when trying to upgrade to Fed32. I ended up having to do a clean installation to Fed33. The basic problem is NM fails to connect to a wifi AP for which password and ESSID is known and tested. Proof: if I reboot to Ubuntu 20.04 it works fine. I had this connection working on Fed31 for about 6mo. When F31 went EOL I had to update but the live iso failed to connect, so I'd been putting it off. I had to upgrade so I went straight to Fed33 which screwed up , so I did a clean installtion of Fed33. Wifi to AP worked :) Having now migrated to Fed34 I'm back to borked wifi. Symptom is NM shows the AP but never ending whirling blobs icon in the task bar widget. I need to "disconnect" despite the fact it never actually connects. It seems to communicating with the AP but failing to identify. |
Why can't I enable SSH on several ports? Posted: 20 Jul 2021 10:00 AM PDT In order to train my networking skills, I am trying to get a Raspberry Pi to listen for ssh connections on both ports However, I get a I of course tried both restarting sshd and rebooting the Raspberry Pi, and I have no user specific ssh config file. Thanks a lot for any help ! |
Is it possible to encrypt sensitive data on a headless embedded device in a secure way? Posted: 20 Jul 2021 09:14 AM PDT My company works with Raspberry Pis, where all data (OS, our software, etc) is stored on an SD card. We configure these devices (load our software on them), and send them out into the field (an environment we don't control). These Pis have sensitive data on them, and the fear is that someone in the field will take the Pi, and get access to this sensitive data. The obvious solution of not storing sensitive data on the SD card, but rather streaming it over a secure network won't work for us - the Pi won't always have access to internet, or any other kind of network. The other obvious solution is to encrypt the partition where the data is stored, but that is proving to be a challenge. The Pi needs to be able to access this sensitive data as it runs, which means no matter what type of encryption we use, the Pi needs to be able to decrypt the encrypted partition at boot. This implies that it needs to have some sort of decryption key that is stored on a non-encrypted partition, which is inherently flawed. An attacker can easily gain access to the key, and use it to decrypt the encrypted partition. There are hardware solutions, like the Zymkey, that promise to address this. We tried that, and it took me just over 5 minutes to break into an encrypted root partition that used the Zymkey as its key. The problem is that even though you can encrypt the root partition, you can't encrypt the boot partition, which stores the kernel, and the files that pass args to the kernel at boot. This lets an attacker modify these bootloader files, asking the kernel to start a shell at boot for example, giving the attacker full access to the encrypted root partition. Even if we were to compile our own custom kernel that didn't accept any args, preventing boot args that give an attacker shell, this custom kernel would be stored on the /boot partition that the attacker has access to. Nothing would stop them from just replacing our custom kernel with a generic one. I know you can hack together some hardware solutions, where you glue the SD card, and/or put the Pi in a box that's rigged with booby traps, where if someone tries to open the box, it will delete the encryption key, and unmount the encrypted partition (or reboot). Those are all relatively easy to bypass, and are hacky at best. So my question is this: Is it conceptually even possible to encrypt either the entire root partition, or just some data partition where sensitive files can be stored, so that if an attacker gets their hands on the SD card, they won't be able to get their hands on the files themselves? Linux still needs to be able to decrypt and use these files as it runs. |
Posted: 20 Jul 2021 08:52 AM PDT I have a process Moreover, I'd like this CPU load extraction to continue every As far as I understand, this requires that two processes simultaneously. Any thoughts on how I can achieve this? Preferably as a direct command to provide the Terminal—with a shell script as a last resort if necessary. |
Nginx Serve Up 8443 Application over 443 Posted: 20 Jul 2021 08:24 AM PDT 0 I have a PHP running on a current nginx running over HTTPS (443), I also have a Java application running over HTTPS port 8443. Is there a way that I can expose the Java application over HTTPS (443)? Maybe using proxy_pass or something? https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/ My aim is to have both applications available over a single port by the user going to: https://server/ - Standard Web pages https://server/java - Redirects to the Java app Many thanks. |
Unlock GRUB bootloader password remotely Posted: 20 Jul 2021 10:04 AM PDT Is it possible to unlock password protected grub loader remotely? For LUKS encrypted disk, I can unlock using |
How to passthrough GPU in QEMU-KVM? Failing to start Posted: 20 Jul 2021 08:03 AM PDT I have tried countless guides and always ended up with the same result, so it's time I ask those who know what's going on. I have all virtualisation IOMMU etc enabled in my BIOS. I am running the VM without issues when not passing through the GPU, no errors, great performance etc. When I do try to passthrough the GPU (both GPU and same IOMMU group devices) and press start the VM, nothing happens. Literally nothing, as if I did not press start the VM. When I try to remove the PCI passthrough, virt-manager crashes. If I forcibly close it then start it again, I can't connect to the server (qemu://system) until I fully restart my PC (logout doesn't help). What am I missing? I have a second GPU of course, which is what I've connected my monitor to. I have Nvidia drivers installed. Both GPUs are recognised and functional (tested by switching the monitor). The GPUs are 3060 and 560. Using Debian 10 and everything is updated to the latest version. |
Posted: 20 Jul 2021 07:55 AM PDT I have a file: And many files: How to replace the first column in many files by the last column of the file in such a way that the first column of the file is the same as the second column of many files. The desired result for the small file given for an example is I tried: The first columns of small files disappered instead of to be replaced. |
Linux Mint: Read only file system error Posted: 20 Jul 2021 08:47 AM PDT Linux Mint was running fine until one day, suddenly I was unable to write any changes to other file systems. Screenshots from (1)Sublime Text (2)VS Code: https://imgur.com/a/o1fCvim now the first thing I tried to do was check if permission to read and write was revoked which seemed to be the only possible reason for this error but to my surprise it had read and write access and group was set to root. now I opened Thunar with root access and tried changing now If I click Yes, then it keeps on prompting me for every single file inside the folder which basically means no changes were made. Then I tried following an answer given in the following post: https://askubuntu.com/questions/628862/sublime-text-3-authentication-question-when-saving-document# , but still had the same error just in the terminal. At this point I have no idea what or where to change permissions from. It was working perfecty a day before and I don't remember making any changes to the system settings whatsoever. Sorry I the format of my question was not upto StackExchange's standards since it is my first time asking a question. kindly help. [EDIT] found the solution by following @Panki 's advice that I was on the wrong track. took a different approach and came to know that Windows10 (on dual-boot) can enable Quick Boot so all I had to do it disable it by going into the BIOS and it fixed everything. |
Share the internet of one WiFi card through a hotspot of another WiFi card Posted: 20 Jul 2021 10:31 AM PDT I have two WiFi cards. One is connected to a router, and gets an internet connection. The other is set up as an Access Point (AP), to which devices are able to connect. But they don't get any internet. How to share the internet from WiFi-1 ( I'm using Fedora KDE. After adding a bridge between the two, using the GUI: Settings in |
Setting which ports to use for passive FTP connection with Linux's ftp client Posted: 20 Jul 2021 07:57 AM PDT I'm trying to connect to a FTP server behind a firewall that allows incoming connections in the range 6100-6200 only. I have successfully connected to this server using But I'd like to reproduce the behaviour of this curl command with other clients that are more friendly to use from Python. In principle Linux's Currently I can not make it work with The same set of commands work from my laptop, therefore it seems clear that the problem is the firewall. How can I force |
Fully unattended Windows 10 installation in KVM Posted: 20 Jul 2021 08:35 AM PDT I have a script that automatically creates and starts a (Q35/UEFI based) VM using virsh. The VM has a Windows10.iso mounted to it and also a virtual floppy disk that contains an So I basically already have everything automated. But there is a problem that I haven't been able to work around: After successfully booting from the Windows10.iso, it always asks to press any key to start the installation. Which kind of makes sense because if it didn't, it would just automatically reinstall itself every time the installation is done and it reboots. What I would like instead is to bypass the I think I've seen VMware or VirtualBox do this before. Now I'm wondering if there is a way to do this using KVM. Maybe a flag that I can set that automatically detects the prompt and then sends virtual keyboard input to the VM. Note: I don't want to modify the |
Extend partition size on the left Posted: 20 Jul 2021 09:43 AM PDT I have Linux Debian on the partition sda4 of my 1TB hard disk: Between sda3 and sda4 there is some space (exactly, 267 GB of unallocated space) that I took from windows (sda3) to extend the Linux partition. So, this space is on the left of sda4 and I want to give this it to the Linux partition, sda4. Using GParted this is complicated to do, unless someone could explain it easily. I'd want to use fdsik, if possible, so to modify the partition size from the partition itself. Many thanks in advance to all. |
How to filter for only unique errors in multiple logs using grep? Posted: 20 Jul 2021 10:14 AM PDT I am trying to use the following pattern on Ubuntu: to find relevant errors in many different .log files recursively in /var/log and its subfolders. The issue I am having is that this results in tens of thousands of lines of matches being printed as the expression is run. I'd like to filter these somehow in at least one of the following ways:
Can I do this by piping the output to something? Currently going through each log for errors is incredibly time consuming which is why I am trying this. But the expression I am using prints so much info that it is also not usable itself either. I have tried piping to 'less' but that removes highlighting which makes it harder to read and does not fix the issue with the output being so large. I realise I could also limit the expression to specific files at a time, but as I mentioned some logs are full of matches and others have very little. So further filtering out duplicates would be really helpful. Here is an example error line in one of the many logs I am searching: If there are hundreds of such errors, I would like to show eg. at most 3 of these before moving onto the next match. Alternatively, due to how the dates are listed in the log. It would be great to filter to match for only specific dates, how would I go about doing this? Date filtering would limit the output greatly. |
How to "split" an attachment with Mutt ? (Message/partial) Posted: 20 Jul 2021 10:15 AM PDT A few days ago I started to use the library MUTT (send email) in the command line. I know how to "modify/create" headers with the command line "my_hdr", but I can't find a way to send a big file (I know there is a limit. But I saw some library that "split" the attachment with an id to recompose the original file). My question is: How can I do that (if it's possible ofc) with Mutt? My goal is to create a script that's why I use the command line |
How can I email a terminal session typescript without raw data? Posted: 20 Jul 2021 10:15 AM PDT I have a bash script that tries to kill two birds with one stone by running commands with The final log file is quite long as it is a typescript of everything that was displayed in the terminal session; every single progress output is logged. However, if I read the data with For instance: Opening the file with Whereas, with However, if writing The resulting
The command below emails raw data.
|
hylafax probemodem fails to autodetect USB modem for adding a modem Posted: 20 Jul 2021 08:46 AM PDT On Ubuntu 21.04 I'm having trouble adding a USB modem to my Hylafax 6.0.7 installation. It consistently fails to probe on two different USB modems. I've gotten the packages installed and ended up appending the following to I noticed this was omitted from several tutorials floating around on the internet. No matter, I was able to talk to the modems and query the modem classes with cu. For reference, I have two USB modems that I'm working with: a USRobotics 5637, and a "USB 2.0 Fax Modem" acquired from Amazon that has a Conexant chipset as reported by dmesg and labeled on the box. Both mount as
Per above, at first there was no activity on the modem when I ran probemodem. However, now that I added the udev rules there is a flurry of blinking lights on both modems when running probemodem for about one second, then the blinking stops and only the power light remains on.
I checked permissions on the devices, and both are I also noticed that there is no fax group on my system after installing the So, I know that adding the rules to
I'm sort of a noob when it comes to more advanced Linux configuration; I appreciate any help in advance. |
How do you set --author and --message for the image using buildah? Posted: 20 Jul 2021 10:27 AM PDT There is both a |
How do I change the icon on an app installed as a "flatpak"? Posted: 20 Jul 2021 09:59 AM PDT On my new Meerkat, running Pop 21.04 (based on Ubuntu), I have Thunderbird installed as a flatpak. And I would like to change the application icon (along with a number of other application icons) to a tongue-in-cheek version (in the case of T-Bird, the mascot has his wing wrapped around a bottle of Thunderbird wine; in the case of Firefox, which came pre-installed, the mascot is chewing on an Internet Explorer logo). So far, nothing I've tried for T-Bird has had the slightest effect on what shows up in the applications menu or the dock: I've tried changing the .desktop file to point to the fully-qualified pathname of a PNG file; no effect (and I backed out the change). I've tried backing up the hicolor directory in .local/share/flatpak/app/org.mozilla.Thunderbird/current/active/files/share/icons, then replacing every last instance of org.mozilla.Thunderbird.png within with a correctly-scaled version of the modified icon; still no effect, even after both an "update-icon-caches" and a system restart. I tried variations on this everywhere else I could find either an instance of org.mozilla.Thunderbird.png, or a link to one. For what it's worth: |
rsync could not find xattr #1 for {file}... error in rsync protocol data stream Posted: 20 Jul 2021 08:08 AM PDT I have regular and frequent backups from a set of QNAP systems to a central backups repository. Backups are Recently I've been getting this fatal error from one of them The Extended attributes on the source file What is this I'm currently trying to build an MRE but until I found the Thanks |
Sed to print out the line number Posted: 20 Jul 2021 08:51 AM PDT Here is my sample file I can print line 2-4 with I can also print out the line number as well with Also, the same thing can be accomplished with But I'm not sure how to print out the line number with Would it be possible to print out the line number with |
GNOME: Different PAM configurations for lockscreen vs login Posted: 20 Jul 2021 09:48 AM PDT I recently purchased a U2F security key, and I have successfully configured my Ubuntu 18.04 machine to require authentication via the key as well as my usual password to log in. I am hoping to change my authentication configurations such that:
Is this something that is possible with the stock GNOME lock screen? If so, which pam configuration do I have to edit? Currently the only thing I have changed is adding to /etc/pam.d/gdm-password, under |
Allow user to run PHP-FPM without password using sudoers Posted: 20 Jul 2021 08:07 AM PDT I'm trying to make it so a user can reload PHP-FPM without needing a password everytime. I've added the following to the /etc/sudoers file using pkexec visudo, and there are no syntax errors, but it is still not working, any ideas? I've hunted everywhere and this seems to be a common problem of getting it to work, but each question doesn't seem to have an answer, or one that works for me. Using CentOS 7. Thanks. When using sudo -u I get the following: ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === Authentication is required to manage system services or units. Multiple identities can be used for authentication: I can then proceed as normal, but the point is for forge to be able to do this without requiring authentication. |
Error when building Apache 2.4.25 from source with open ssl 1.1.0c Posted: 20 Jul 2021 10:00 AM PDT I have built Apache 2.4.25 with OpenSSL 1.0.2 successfully. But Because of some security holes we found in our Internal tests, I have been asked to patch Openssl with the latest version. So I am trying to build Apache httpd 2.4.25 with OpenSSL 1.1.0c (or) 1.1.0d My Environments All the above Apache dependencies have been successfully built and installed Apache 2.4.25 - Installation steps I am getting the below error when building Apache from source with open ssl. Please help me in the right directions. |
How can I have two keystrokes to delete to either a slash or a word in zsh? Posted: 20 Jul 2021 10:17 AM PDT Bash behaviourI've just migrated from Hence, Alt+Backspace would delete back to the previous slash, which was useful for editing paths. Separately, Zsh behaviourIn |
Verify that partition is encrypted Posted: 20 Jul 2021 08:24 AM PDT I just installed Debian and as far as I can remember I encrypted my home-partition using LVM. During the boot process I haven't been asked to enter the password. Is there any way to check whether the encryption is up and running? |
CP: max source files number arguments for copy utility Posted: 20 Jul 2021 09:09 AM PDT Consider that there are countless number of files under /src/ How many files |
How to determine Linux kernel architecture? Posted: 20 Jul 2021 08:02 AM PDT
|
What is Fedora's equivalent of 'apt-get purge'? Posted: 20 Jul 2021 09:18 AM PDT In Debian, there's at least two ways to delete a package:
The first preserves system-wide config files (i.e. those found in "/etc"), while the second doesn't. What is Fedora's equivalent of the second form, |
You are subscribed to email updates from Recent Questions - Unix & Linux Stack Exchange. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment