Recent Questions - Unix & Linux Stack Exchange |
- Sed not working with / in the content itself [duplicate]
- Repair Grub Bootloader for Windows-Only Boot (After Removing Linux from Dual-Boot)
- TCPDUMP w/SNAT Configuration Shows Private IP on ICMP Reply
- Add application menu entries in Fedora 34
- How can I fix LVM PV size after a botched encrypted partition shrinking
- Using tee in apache error logs to write to local and also syslog but date function is not working
- Why can't remove the java version?
- Low eficience while using dockerized OpenMCU-ru's image
- sed : Replace the string in one variable with another in a file [duplicate]
- How to change the order in which the MATE file manager `caja` lists devices bevore bookmarks
- How to execute a script after ppp connection establishes?
- make results in 'No idlpp IDL pre-processor found!' error
- Configure first day of the week for xfce calendar in centos 7
- Feasibility of storing keys unencrypted on RAM under certain assumptions
- copy files from source to destination with uuid renaming
- How to delete an indelible file?
- Merging two files based on the first column depending on specific pattern's location in file 1
- Is there a kernel option to allow a userspace app discovering custom USB devices on the host?
- Ubuntu 18.04 freezes on log in screen locally while working with RDC
- 8021x wireless connection using iwctl
- sshpass with ssh -J jump host
- find string and print first and last characters of line
- HASP key does not work over ssh
- What is the /etc/subuid file? [closed]
- Firewalld: How to whitelist just two IP-addresses, not on the same subnet
- btrfs found uncorrected disk errors, How can I find which files they are in?
- su cannot open session error when starting Oracle XE database
- How to find gnome-terminal currently used profile with cmd line?
- How to view full bounce message in mutt?
Sed not working with / in the content itself [duplicate] Posted: 10 Sep 2021 10:06 AM PDT I need some help changing this config file via sed, for some reason its not working. I think it's cause i have a |
Repair Grub Bootloader for Windows-Only Boot (After Removing Linux from Dual-Boot) Posted: 10 Sep 2021 09:57 AM PDT I had a dual-boot (Ubuntu+Win10) configuration on my laptop (single disk). Due to space limitations, I had to delete the Ubuntu partitions (root, home, swap in extended partition) and extend the big NTFS partition to the full disk. Unfortunately the Grub configuration was stored in the Ubuntu part. So I was not able to boot any more. I just got to the grub repair CLI. During repair attempts using a Ubuntu 20.04 live USB stick, I got to the point where I now have sda1 (NTFS 500MB), sda2 (Windows 10, 250GB), sda3 (Windows recovery) and sda4 (300MB ext4 designated as /boot partition for Grub). With the latter I try to repair the existing configuration. I installed grub using I am able to boot into the Grub CLI (2.04). With the commands from this post, I can boot into Win10 again: But at this point I am stuck. I do not see how to install the grub menu permanently again. Commands like So does someone have a clue on how to permanently add the windows boot entry to Grub in this scenario? A quick workaround which does not require me to type the five commands on every boot would also be fine. Thanks :-) |
TCPDUMP w/SNAT Configuration Shows Private IP on ICMP Reply Posted: 10 Sep 2021 10:36 AM PDT Problem: TCPDUMP icmp reply inexplicably has the private address. I would expect it to have the public address. I have configured my linux box to perform SNAT on packets leaving bridge interface The outgoing icmp packet correctly has it's source address changed from My network configurations are as follows: Am I misunderstanding where TCPDUMP collects its packets from? Is it after the address has been translated back to the source address? EDIT: So does SNAT get applied after it enters the physical interface ( |
Add application menu entries in Fedora 34 Posted: 10 Sep 2021 09:32 AM PDT After upgrading to Fedora 34, the |
How can I fix LVM PV size after a botched encrypted partition shrinking Posted: 10 Sep 2021 09:25 AM PDT I apparently messed up today. I have to resize an encrypted root partition to make room for a windows dual boot. I followed instructions from the arch wiki since it seemed to match my needs even though I am using debian. At some point I had to use So, I managed to free 100G for windows, looks good so far. But... Panic intensifies... Is this LVM/LUKS setup in a recoverable state? I think that |
Using tee in apache error logs to write to local and also syslog but date function is not working Posted: 10 Sep 2021 09:19 AM PDT in apache httpd.conf works: ErrorLog "|/var/apache/bin/rotatelogs -f /usr/HTTPLogs/apache/errors.%Y.%m.%d 86400 output: -rw-r----- 1 root system 48919 Sep 10 12:08 errors.2021.09.10 now trying to write error logs to local folder and to syslog: ErrorLog "|tee /var/apache/bin/rotatelogs -f /usr/HTTPLogs/apache/errors.%Y.%m.%d 86400 | /usr/bin/logger -thttpd -plocal6.err" output: -rw-r----- 1 root system 15941 Sep 10 12:32 errors.%Y.%m.%d any way to get the date function to work inside tee? |
Why can't remove the java version? Posted: 10 Sep 2021 08:48 AM PDT Remove the openjdk-17-jre and jdk : Reboot and log in again. Why can't remove the java version ? |
Low eficience while using dockerized OpenMCU-ru's image Posted: 10 Sep 2021 08:40 AM PDT In my work we have a videoconference system in wich we have a lot of SIP videophones. We use a VM (runing over VMWare on an HP Proliant server, on wich are runing also others VMs) wich run OpenMCU-ru over CentOS6 (the same VM wich OpenMCU-ru's devs posted back in the days in their official webpage). I wanted to upgrade the old CentOS6 VM because is behaving bad while directors use the service, for a newest so I tried, and tried and tried... And so far I couldn't compile it because incompatibilities with old libraries. So I decided to use a docker image (wich runs Ubuntu14.04 and OpenMCu 4.1.6): I used an old HP server (E5520, 8 cores at @2.27GHz and 14GB RAM, 1Gb Ethernet card) as host system, I installed Debian 10.10 and installed Docker, downloaded the image and run it: I set up the same configurations in the new server as in the old one (Video code= H.264{sw}, Audio code= G.711-ALaw-64k{sw}...I set the exact same configuration as the old CentOS6 VM): But every time I make a videoconference using the new system the image is superlaggy and it seems it consuming a lot of cpu usage: And sometimes it gets more than 500%. I guess is a normal value, as I understand a 100% on dockers means it's using 100% of 1 of host's core. So my question is:
|
sed : Replace the string in one variable with another in a file [duplicate] Posted: 10 Sep 2021 08:34 AM PDT I need to replace STUDENT (if found in the file FILENAME) with REPLACE.I've been searching for a couple hours now,so it's time for a question. What is the correct syntax of sed to do it ? My best attempt : |
How to change the order in which the MATE file manager `caja` lists devices bevore bookmarks Posted: 10 Sep 2021 08:02 AM PDT
|
How to execute a script after ppp connection establishes? Posted: 10 Sep 2021 07:59 AM PDT I would like to execute a ddns script every time after pppoe has started or renewed. And I have tried And if the final line is uncommented, it (as well as the entire networking.service) will fail at boot, for dockerd has not started. What is the proper way to trigger such script? Now I can only set up a cron job to do it. |
make results in 'No idlpp IDL pre-processor found!' error Posted: 10 Sep 2021 09:02 AM PDT I am trying to build a private project using I have browsed online but cannot seem to find what the reason is for this error. Strange enough, the |
Configure first day of the week for xfce calendar in centos 7 Posted: 10 Sep 2021 07:33 AM PDT |
Feasibility of storing keys unencrypted on RAM under certain assumptions Posted: 10 Sep 2021 08:44 AM PDT We have IoT gateways that run Linux 5.4.31 kernel. These gateways need to manage thousands of devices which are mobile and each has a unique encryption key. The idea is to fetch the key of a device from a server (via secure channel) when the device enters the range, use it for decryption as long as the device is in the range and delete the key from memory when it leaves. Decryption must be done on the gateway since we have to do specific actions depending on the received data. We want to store the keys on RAM unencrypted because we don't want the overhead of decrypting the keys for each time we access them. We have following assumptions:
What are the options of an attacker to access the encryption keys on the RAM under these assumptions if
Also what restrictions should we put on a non-root user, e.g. they can't access swap memory, core dumps, install packages, use gdb, etc. to prevent access to the process RAM? Note: If the attacker has root access then they can access to all the keys using the private key that is used to access the server anyway, so we do not consider this case for this question. |
copy files from source to destination with uuid renaming Posted: 10 Sep 2021 09:43 AM PDT I have some files in a recursive folder structure, which I would like to copy to destination and give them a uuid name instead of the original name (because the names collide). Nonrmally I would do something like this: but because the names collide, I am unable to do this. Thus, I would like to assign a uuid name to each file which is being copied. To this end, I have tried this: but I get only copied file :( rather than a bunch of files in the folders. |
How to delete an indelible file? Posted: 10 Sep 2021 09:20 AM PDT I was copying a file via ssh and the connection dropped. After that, I am left with a zero-sized file which cannot be deleted. Remote host is CentOS 6.8. When trying to edit the file, it keeps the changes, but when trying to delete, it assumes a zero size and still stays. Trying to use |
Merging two files based on the first column depending on specific pattern's location in file 1 Posted: 10 Sep 2021 09:13 AM PDT I have the following files: File 1 (around 7000 lines): File 2 (around 300k lines): I would like to merge the two files based on the first column depending on 1402-s location in file 1. For example, if 1402 is in the second column, I want to print the first column of file 1, the second column of file 1 and the second column of file 2. If 1402 is in the third column, I want to print the first column of file 1, the third column of file 1 and the third column of file 2. 1402 can occur in any column, not only in the second or the third. However, it does not occur more than once/line. If $1 from file 2 does not include $1 of file 1, I want to print $1, 1402 and unknown. Desired output: I use the following script to merge the two files: |
Is there a kernel option to allow a userspace app discovering custom USB devices on the host? Posted: 10 Sep 2021 08:14 AM PDT Consider a minimalist, buildroot-based Linux image on some 1-PCB computer with a USB host port. Then there is another small computer: a Raspberry Pi Compute Module "CM3", the only connection between the two is USB. When the CM3 has a Linux running on it, it acts as a ethernet gadget for communication. But when the CM3 needs to be flashed, an input pin on it, toggled by the buildroot machine, tells it "boot mode", and it will become a custom USB device "BCM2710 Boot". The Raspi folks then offer a userspace program, usbboot aka rpiboot, to find the device and upload a small image turning it into a mass storage device. When I try this, plugging the CM3 USB into a "normal" RaspberryPi's host USB port, I see this with dmesg: Rpiboot does then find the device and sends over that spepcial image mentioned. So that works. But when I plug it into my buildroot machine instead, I only see this: So it appears to see that there is some USB thing new, but won't go further. And rpiboot waits forever instead of finding it like on the Raspi-host. So it seems there are one or more Linux kernel config options which are not enabled in my buildroot image, which prevents this from working. I got this idea because initially, all the ethernet gadget stuff also did not work and I had to go and enable CDCETHER and some other options - but I have no idea what to look for with this non-standard device here. There are a lot of not-enabled CONFIG_USB_* options that seem to pertain to specific devices, but nothing like "custom" or such. What is/are the corresponding option(s)? Added: a view of sorted and line-matched (where same options) excerpts of both kernel configurations: I removed everything that's the same setting on both sides, drivers of specific devices, or nothing to do with USB, to shrink the listing by a fair amount. I went through short descriptons of these kernel options on https://cateee.net/, and so far saw nothing that seemed to fit the bill - but it's not said I didn't overlook or misinterpret something... |
Ubuntu 18.04 freezes on log in screen locally while working with RDC Posted: 10 Sep 2021 07:32 AM PDT Some times ago I have installed In itself, everything has worked fine, as I can use RDC from my Win laptop to log in and work on the Dell tower. However, now that I am back at the office, I discovered that if I try to work locally on the Dell tower, Ubuntu freezes on the log in screen. Specifically, I can see the mouse pointer but neither the mouse nor the keyboard seem to work. I have tried to log off from RDC before trying to connect locally, and I tried to turn off the tower from RDC and turn it on locally. Both fixes have not worked. |
8021x wireless connection using iwctl Posted: 10 Sep 2021 10:26 AM PDT I am running Arch Linux and am using iwctl to connect to the WI-FI. I have tried to connect to a network that is using 8021x security and iwctl comes up with the error message "Not configured". How do I configure Edit: The network also requires a username to login not just a password. |
Posted: 10 Sep 2021 09:05 AM PDT I have a script with a couple of ssh commands that use a jump host. I would like to enter the jump and target server passwords each time and tried to use Can we "nest" many |
find string and print first and last characters of line Posted: 10 Sep 2021 09:52 AM PDT I have files with hundreds of lines of varying length. I want to find each line with the string "New" and print the first 7 characters and the 10th from the last character. For example, And my output would be: |
HASP key does not work over ssh Posted: 10 Sep 2021 08:43 AM PDT I am using a software product that uses a HASP USB dongle. The software runs on a Linux box and I would like to run it remotely via ssh (it is a command line software tool). When I am physically on the workstation I can run the tool. When I login via ssh, it says it cannot find the License key. My other team members use the software tool (separate installation) and are able to use it remotely. I just installed this thing and I can't seem to use it remotely. There isn't much documentation on this HASP dongle and I am not sure if there some super-tight restriction - I think some debug feedback would be great. Note I am not trying to do anything outside the ordinary. I rebooted the machine and the behavior was still the same. I am thinking that maybe the HASP (UDEV rules) do not permit network users? Any thoughts guidance would be informative. |
What is the /etc/subuid file? [closed] Posted: 10 Sep 2021 10:52 AM PDT Following docker instructions, I've run a docker with I don't understand what it means, please explain. |
Firewalld: How to whitelist just two IP-addresses, not on the same subnet Posted: 10 Sep 2021 09:05 AM PDT I'm running firwalld on a VPS / webserver. The These are fake IP addresses and notice that they are intentionally not on the same subnet. I think I understand why the following doesn't work (it locks out one or the other IP). What do I need to modify for this to work (so it doesn't lock out one IP or the other or both)? Thank you! :) EDIT: I also tried a I think the logic might sound something like: EDIT2: Posting the output of |
btrfs found uncorrected disk errors, How can I find which files they are in? Posted: 10 Sep 2021 07:33 AM PDT I ran btrfs scrub and got this: OK, I have good backups, and I would like to know which files these 28 errors are in so I can restore them from backup. That would save me a lot of time over wiping and restoring the whole disk. |
su cannot open session error when starting Oracle XE database Posted: 10 Sep 2021 10:00 AM PDT I have a RHEL 7.2 server with Oracle 11g Express Edition (11.2.0) installed. The installation of Oracle created a file named "oracle-xe" in /etc/init.d This is a bash script that can be used to start and stop the listener and database manually. When I'm logged on to the server, I can run the following: and the Oracle listener + database are started without issue. I can log on using sqlplus and execute commands. I'm trying to use chkconfig to make it so that oracle-xe is executed automatically on system start, so that I do not have to manually start the listener and database every time the server is rebooted. The oracle-xe script itself is lengthy, but the meat of it contains the following: I added the $STARTUP_LOG code and the >> redirect of output so that I could sort out what was happening. I added the script to chckconfig with the following: The following command yields the given (shortened) output: I reboot the server, and it generates a log file at /home/tsm/log/oracle-xe.log with the following output: and as you might guess, as a result of this su failure, neither the listener nor the database engine have started. Since I see the reboot date/time in the log file, I know for sure that the script is being executed upon boot. It seems to me to be a permissions issue, that whatever account is being used to execute init scripts at startup for some reason cannot su as $ORACLE_OWNER, yet me as a lowly admin can do this just fine from the command prompt. It was my understanding that the init code is executed as root, and therefore this su command should run without a problem. I've been searching and trying various things for the better part of a day trying to sort this out, and have pulled out what little remains of my hair. The server itself is using DirectAuthorize to grant access permissions, which is why I end up using dzdo instead of sudo. Could this have something to do with it? |
How to find gnome-terminal currently used profile with cmd line? Posted: 10 Sep 2021 08:04 AM PDT I'm using Ubuntu 16.04 and I want to be able to tell which profile is used by a given terminal emulator. Just the name would be enough. It's trivial to find with GUI : just right click in the terminal window, and the profile in use will be indicated under "Profiles". You can also go Edit -> Profile Preferences -> Profile Name. I would like to access that information with command line, but can't find how. |
How to view full bounce message in mutt? Posted: 10 Sep 2021 09:54 AM PDT I got an error when sending email with mutt , some "red" text shows at the bottom of terminal , how should I view the full error message ? Is there a shortcut / macro that I could use / define ? |
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