Recent Questions - Unix & Linux Stack Exchange |
- sftp with chroot and file creation problem
- How do I set an interface to be used for DNS on Linux?
- /bin/bash /var/tmp/.system/[scan]
- What is dbus-launch?
- pgrep process count show extra count
- Command line http analyzer
- What are Linux system libraries?
- How do i solve this error while trying to install Ubuntu on vagrant?
- How can I get my script to work exactly like my terminal command?
- webmstrssh key authentication still is asking for password
- Copy files to a particular remote server from a list of servers
- Systemd service does not start (WantedBy=multi-user.target)
- amdgpu: Unsupported power mode 0 on RENOIR
- Assign sed command correctly
- How to read and consume the input of /dev/input/
- How to scan for the Pegasus spyware with Debian/KDE & Android: getting " [mvt.android.modules.adb.base] Unable to connect to the device over USB."
- Is there a way to check if the script in background process is crashed?
- How to use Conky variable with external command?
- Bash interpreting a variable assignment as a command
- timedatectl fails to query server
- Debian 10 Wifi Problem with MT7630e
- How to install ocx file to wine
- Pass an option to a makefile
- Tomcat 8 503 Error with Apache2 mod_jk as Reverse Proxy
- systemd service using 100% of my CPU when it doesn't if I start it without systemd
- Get separate used memory info from free -m command
- Check whether files in a file list exist in a certain directory
- MediaTomb - Not showing Cover Art from music folder in the photo collection
sftp with chroot and file creation problem Posted: 27 Aug 2021 09:51 AM PDT I configured second sshd systemd service using own sshd configuration with different tcp port configured in it and following configuration of sftp subsystem: The user I created in sftponly group is: The directory tree for chroot is: I can successfully do sftp with the private key however I can't create any file in user's /srv/%u chroot directory: When I do chown sftpuser /srv/sftpuser and go back to active sftp session I can create files but when I logout I can't login sftp anymore, until I change back I can of course create additional directory inside Additional question - how to prevent other users on the system from using this custom sshd configured for sftp only? When I set above |
How do I set an interface to be used for DNS on Linux? Posted: 27 Aug 2021 09:39 AM PDT I have a Linux machine with 3 network interfaces, I noticed that when the main network interface (the one with the lowest metric) loses internet connection, all other network interfaces are not able to resolve DNS queries anymore. Once I manually increase the metric of the main interface so it's not the one with the lowest metric anymore, DNS starts working again for all other interfaces. It is my understanding that DNS is resolved from the "main" interface, the one with the lowest metric, is there a way to set the machine in a way that every interface will use itself to resolve DNS? |
/bin/bash /var/tmp/.system/[scan] Posted: 27 Aug 2021 09:25 AM PDT I noticed a process is using 15% from my CPU. Checking the process it is just showing [scan] If I try to kill this process, it will rerun itself again. When I check with ps -fp it is showing Any help please? |
Posted: 27 Aug 2021 09:10 AM PDT I use Linux Mint. I switch from Cinnamon to i3wm a few weeks ago and I'm loving i3wm. Now, when I run So, what's dbus-launch? And Why does it take so long to open some GNOME programs without Thank you! :) |
pgrep process count show extra count Posted: 27 Aug 2021 08:21 AM PDT I've a scirpt name server.sh when I run script I get output as Why do I get process count as 2 instead of 1? I only have one script running and have also excluded grep process. Even using pgrep -f server.sh and excluding pgrep gives 2 as process count. |
Posted: 27 Aug 2021 08:14 AM PDT I would like to learn more about http(s) requests. Learning requires doing, not just reading. I tried inspecting Is there a similar command line tool which however spews http packets/headers? I guess |
What are Linux system libraries? Posted: 27 Aug 2021 07:57 AM PDT When I look around the web for information about the architecture of Linux, many articles say one component is what is known as "System Libraries" but I'm unable to find an explanation of what these are, what is their job in the system, where are they generally found and what are some examples of them? Thank you for any information |
How do i solve this error while trying to install Ubuntu on vagrant? Posted: 27 Aug 2021 07:39 AM PDT How do i solve the following error "the executable cmd.exe vagrant is trying to run was not found in the %path%" |
How can I get my script to work exactly like my terminal command? Posted: 27 Aug 2021 08:17 AM PDT tl;drThe command Both script and terminal are working just fine on another box. The box is behind a corporate proxy. I assume there is some difference in the environment in the script compared to the shell. QuestionHow can I get this command to run from within the script? Detailed InfoBack StoryEverything worked on both boxes until the repository was migrated to GitHub. The origin was updated accordingly on both systems. The development system worked immediately, while the staging system just won't work. ScriptThis is how the part of the script looks it checks all repositories are reached before acutally starting and therefor stops here: The two What I've triedcompare shellsAs I am suspecting some problem with environment variables I was trying to invoke the failing command
What does not seem to work is the following way:
git configAt first I assured the effective git config is the same on both systems. Since then I tried adding certain options on the staging system to fix the problem, but without success. I tried setting:
As it didn't help I removed it again. debugging connectionI added ... and the output is proxy configurationI'm told that the systems should be subjected to the same firewall rule sets as there is one for the subnet. |
webmstrssh key authentication still is asking for password Posted: 27 Aug 2021 07:38 AM PDT Hi everybody I am process for creating a passwordless ssh connection between servers. I have created the key via keygen and have copied to the remote server via this command: Local system it asks for the password I entered but when I try to log in it still asks for password. I read about permissions and made sure the home dir is 700, .ssh is 700 and authorized keys is 600 but still get a password prompt: remote system(permissions): I have tried multiple time to add the key. when I do a ssh connection with verbose from local system to remote system 192.168.1.241: I updated the permissions for the remote webmstr home directory: when I try from source server: |
Copy files to a particular remote server from a list of servers Posted: 27 Aug 2021 07:43 AM PDT I have 3 remote servers to which I need to copy files from the source server rather than having to run same command multiples times for each server, can it be possible to select one server from the list and then transfer files to that server? My aim here is to avoid writing same piece of code for each server individually. Eg: Enter which server you want the files to be copied to (B/C/D): if I choose B on command line, following command gets executed: Similarly if other options are chosen, files should get copied to that server. Here's the code that i have for copying files on 1 server. |
Systemd service does not start (WantedBy=multi-user.target) Posted: 27 Aug 2021 06:55 AM PDT OS: Ubuntu 20.04.3 DescriptionI did IssueCould you please tell me, why user service does not work with Reference |
amdgpu: Unsupported power mode 0 on RENOIR Posted: 27 Aug 2021 10:01 AM PDT I'm having trouble with my Lenovo T14 (AMD) laptop with a Ryzen 7 running Kubuntu (20.04.3 LTS). Until yesterday everything worked fine. However, yesterday suddenly the laptop froze and I had to turn it off forcefully. When rebooting I got this message on a black screen: Booting into default does not work, I end up at the exact same screen within a few seconds. Rebooting resultet in being able to choose OS (since I have only Kubuntu, that does not matter) and then I end up at the same place. According to https://askubuntu.com/questions/1355957/amdgpu-unsupported-power-profile-mode-0 this is a kernel problem with the 5.11.0 kernel. Mine is 5.11.0-27, so I tried switching to 5.11.0-25, 5.10.0-1044 and even 5.8.0-63: With 5.11.0-25 and 5.10.0-1044 I have the same result. With 5.8.0-63 I receive a different error message (something about a link not found) but still on the same screen. Booting into recovery mode doesn't really help. It then shows me a mixed screen with the recovery mode menu overlaid with lines of the 'emergency mode' screen. When typing it seems to react mostly as if I were in the 'emergency mode' screen, but the recovery mode screen also reacts at times... Booting from a life USB stick (around 6 months old) has worked so far, however, I would not know what to do with that except for reinstalling my system. Which I would like to avoid for now. And if it's a kernel problem, it probably would not help either, would it? Has anyone an idea what exactly the problem could be and how to resolve that? Any help is much appreciated. BTW: I tried the workaround suggested in the link above, but it didn't change anything. I also realise that shortly before the freeze, I couldn't access some folders on an external drive and firefox had crashed several times for no obvious reason. |
Posted: 27 Aug 2021 08:19 AM PDT I am trying to assign the result of a sed command to a variable in bash, but I am unable to escape everything corrrectly (probably just due to my lack of knowledge in bash), I have tried: but I am getting
UPDATED SCRIPT This is the script I am using updated with the code from the answer. Only the path and the comment have changed: executed with
On execution I get: |
How to read and consume the input of /dev/input/ Posted: 27 Aug 2021 08:31 AM PDT I just started working with Ubuntu/Linux so my knowledge is limited. My idea was to use a barcode scanner in my c++ program as an input device. This works perfect when it comes to reading. I just open the file which represents my barcode scanner and with the input_event struct I can read in a loop the input like this: the scanner acts like a keyboard This is of course very simplified. I have different sequences that trigger different actions. This part works just fine. My problem is that not only my program gets the input, also the focused UI. I would like to consume the input of this device, so it is not shown anywhere else. I am used to very "high level" events of Java, where you can simply consume an event or pass it through. So I am very curious if there is something I can do on this very low level to "consume" it. I tried already read and overwrite the content and to change the group of the /dev/input/event file, I thought maybe if it is not in the input group it would not use it, but apparently it is not as easy than that. Looking forward for ideas or anything which makes me understand better. |
Posted: 27 Aug 2021 08:34 AM PDT On my Debian11/KDE machine I ran However, it always fails with this output: There always has been an issue with establishing an USB connection with my Android phone and keeping the connection up for long even with another smartphone and other USB cables and other USB ports, but it usually works after reconnecting a few times and selecting "Open folder" in the popups of the Dolphin file explorer multiple times (usually not long enough to transfer many files or browse files on the phone conveniently but somewhat good enough). How to solve this? |
Is there a way to check if the script in background process is crashed? Posted: 27 Aug 2021 08:48 AM PDT I am using Ubuntu 20.04 and I want to write a script that checks if ffmpeg command crashed in the background. After the crash happened it should reinitialize that command. Can anyone provide a bash script code for that? |
How to use Conky variable with external command? Posted: 27 Aug 2021 07:39 AM PDT I'm trying to create a workaround for Conky's truncation of usernames with the which leads to "bad substitution" errors. Thinking that it may be because the top function is sending a string instead of an integer, I tried creating a lua function: but this never works either as I can't get the parser to see my variable. How do I send a variable to the |
Bash interpreting a variable assignment as a command Posted: 27 Aug 2021 07:24 AM PDT I've been trying to do something for a couple of days, and I'm stumped; I keep running into the same problem, no matter how I approach this. I have a text file with 2 columns in it; the first is the variable name, the second is the command to be run, with the output being assigned to the variable in the first column. I use That's all a little convoluted, so let me show you. The script is: And the text file is: Everything works except the assignment execution itself. Here's what I get: It looks like Bash is interpreting the whole thing as one command name (string) and not interpreting the What can I do to get Bash to correctly interpret the assignment expression correctly? |
timedatectl fails to query server Posted: 27 Aug 2021 07:08 AM PDT When running systemd-timedated.service has ran. Looking online I haven't found anything talking about this error message. How can I use systemd and timedatectl to have my system clock synchronized with an NTP server? I've also noted nothing under /etc/systemd/ defines the NTP server to use. I'm on an embedded Linux system, built using Buildroot, systemd version 244.5. |
Debian 10 Wifi Problem with MT7630e Posted: 27 Aug 2021 09:04 AM PDT I installed Debian 10 on an Asus notebook. As soon as I installed the Wi-Fi was not working. My WIFI chip is I installed the package firmware-misc-nonfree but Debian still didn't found the WiFi chip so as suggested in many forum I installed this driver https://github.com/neurobin/MT7630E. As soon as I installed it everything worked fine. The problems started when I try to connect to another Wifi. The network manager start searching forever a new Wifi using 100% of one core of the CPU without possibility to stop the process(I tried all possible command for stopping the NetworkManager, like stopping the service and kill the process). I tried to wait until it stop but after hours it never stop. I tried to reboot and shutdown multiple time and the only way to make the Wifi working again is to shoutdown the notebook by hold down the power button. How can I solve this problem? EDIT: The workaround I'm using consist to install the driver(the one from Github) at startup and uninstall before shutdown. It's not a solution but it's the only way to not hold down the power button. |
How to install ocx file to wine Posted: 27 Aug 2021 10:04 AM PDT I am using Mac OS 10.14.5, and I am trying to run an
My I tried another way of installing the two files. I did
So how should I install ocx files to |
Posted: 27 Aug 2021 10:04 AM PDT Makefile Expected behavior Current behavior When I run Makefile version SLE version PSThe point is to make |
Tomcat 8 503 Error with Apache2 mod_jk as Reverse Proxy Posted: 27 Aug 2021 08:06 AM PDT I'm following this guide to setup Tomcat 8 on Ubuntu Server 16.04 using Apache2's mod_jk module as a reverse proxy: Everything works until the last step, which is to change the HTTP and AJP Connectors in server.xml to only listen on localhost. Here's the change I made to the AJP Connector: Before this change, typing https://myhostname takes me to the Tomcat administration page; after it, I get "503 Service Unavailable". I've temporarily turned off my firewall and removed AppArmor. Here's the relevant portion of mod_jk.log: What could be causing this, and how can I resolve it? |
systemd service using 100% of my CPU when it doesn't if I start it without systemd Posted: 27 Aug 2021 07:44 AM PDT I'm using Debian Jessie with the latest updates. I made a systemd service to run a script when my server starts. Here's its configuration:
(I replaced the path here, but the one on my script is correct.) When I run the script In both cases What could explain such a big difference in CPU usage? Thank you. |
Get separate used memory info from free -m command Posted: 27 Aug 2021 09:26 AM PDT As the output of the I want to get only used memory, like 2260, as output. I tried the following command: Help me to improve my command. How can I get it as a percentage, like 35%? |
Check whether files in a file list exist in a certain directory Posted: 27 Aug 2021 08:32 AM PDT The runtime arguments are as follows: $1 is the path to the file containing the list of files $2 is the path to the directory containing the files What I want to do is check that each file listed in $1 exists in the $2 directory I'm thinking something like: As you can see, I want it so that if any of the files listed in |
MediaTomb - Not showing Cover Art from music folder in the photo collection Posted: 27 Aug 2021 07:03 AM PDT MediaTomb adds album covers and DVD covers into the photo collection. That means, when you are going through your photos, you also get album covers intermixed in there. Is there a way of restricting the type of media from specific folders. So, /path/to/music will be restricted to music, /path/to/photos will be restricted to photos etc? |
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