date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,331,741,565,000 |
I remember switching between TTYs on Ubuntu Linux and being able to switch back and forth between an active X session (Unity/KDE/XFCE) and a terminal on another numbered TTY thing / virtual console. I expected the same thing to work in Slackware Linux, but it doesn't appear to and I'm trying to figure out why.
I'm run... |
X takes up a new slot in the kernel data structures that are used for the virtual consoles, exactly for the reason to allow Ctrl Alt Number to switch between the consoles and the X session.
This virtual console is not the console you started X from, but a different one. It is usually passed as an argument in form of v... | How To Switch to Virtual Terminal Running X11 as Subprocess of Login Shell? |
1,331,741,565,000 |
When I press Ctrl-V Ctrl-J in a shell (under urxvt), it starts a new line (positions the cursor at the beginning of a new line), instead of printing ^J.
In vim it prints ^@.
The same situation is in the virtual console.
Apparently something preprocesses Ctrl-J. What is it, and how do I influence it?
$ stty -a
speed 38... |
As Arkadiusz Drabczyk said, readline is responsible for handling of C-v. Particularly C-v C-j. It just handles them differently. Supposedly because C-j (Enter) can be represented in a meaningful way w/o the ^* notation. And the letter in that notation is obtained by or'ing 0x40 to the character code, if you're curious... | Special handling of Ctrl-J |
1,331,741,565,000 |
I'm on Arch Linux (a 32 bits alternative version), and recently I've discovered that the blue lines I used to see in Vim with :set cursorline were supposed to be underlined, and not blue.
That got me searching all around for a solution.
I'm using no graphical environment, so no desktop environment or window manager, o... |
The Linux console driver doesn't support underlines on color displays because it's a compromise between readability and ease of implementation. It's been that way since the mid 1990s, and is documented in console_codes(4):
4 set underscore (simulated with color on a color display)
(the colors used... | How to enable underlines and other formattings on a color tty? |
1,331,741,565,000 |
(After editing significant new infos into the question)
After turning a display off from command line (xrandr --output ... --off), and then turning it back (xrandr --output ... --auto), my X desktop loses the capability to switch to a character console (i.e. alt/ctrl/f1 doesn't work any more).
Other X controlling shor... |
This is an extended comment and not an answer.
In my system, in which Ctrl+Alt+F1 works correctly, I get a KeyPress event for control and alt, but not for F1. Though I know it works since I'm transfered to tty1.
This is the complete xev output in my case (just for comparison):
root@debi64:/home/gv/Desktop/PythonTests... | X: alt/ctrl/f1 doesn't work any more after turning the display off and on again with xrandr |
1,331,741,565,000 |
When I use virtual consoles ALT-F<1~n> in FreeBSD, I want my 'zsh', 'sh' (and possibly other shells) startup scripts to include the virtual console number in the prompt, if it's not the default console '1'.
How do I do that?
|
Set PS1 conditionally on the value of $TTY. The first virtual console is /dev/ttyv0, the second one is /dev/ttyv1, etc.
For zsh, do it in ~/.zshrc. For bash, do it in ~/.bashrc.
if [[ $TTY == /dev/ttyv[1-9]* ]]; then
PS1="[${TTY#/dev/ttyv}] $PS1"
fi
The code for doing just this is the same in bash and zsh. If you w... | How to include my virtual console ID in the prompt, in FreeBSD |
1,331,741,565,000 |
I tried xl console sys-net which is something that works for any other VM (AppVM, TemplateVM), it even works for sys-net-dm (I don't know what that is though)
[ctor@dom0 ~]$ time sudo xl console sys-net
xenconsole: Could not read tty from store: No such file or directory
real 0m5.036s
user 0m0.005s
sys 0m0.01... |
For unknown reasons (bug?) you have to explicitly use the -t flag to specify the console type, which can be any of the two serial of pv. Either works!
So either of the following two work:
sudo xl console -t pv sys-net
sudo xl console -t serial sys-net
But this won't work for sys-net:
sudo xl console sys-net
$ xl co... | On Qubes OS 4.0, how to get xl console access to sys-net? |
1,331,741,565,000 |
One can change virtual consoles (or virtual terminals, VTs) by pressing Ctrl+Alt+Fn (where Fn represents F1, F2, etc.). In addition, when not running X, one can press Alt and the arrow keys to cycle through VTs (Alt← to decrement and Alt→ to increment the virtual terminal).
However, if X is running on one of the VTs, ... |
I can only tell you a dirty workaround.
Use xbindkeys and add to ~/.xbindkeysrc:
"sudo chvt $(($XDG_VTNR-1))"
alt + c:113
"sudo chvt $(($XDG_VTNR+1))"
alt + c:114
If you don't have XDG_VTNR variable, then you have to hardcode previous/next vt.
You also have to put yourself into /etc/sudoers:
USER ALL=NOPASSWD... | key binding to increment/decrement virtual console in X |
1,331,741,565,000 |
I have a KVM switch sharing my USB keyboard between Linux and Windows systems. If the switch is set to the Linux box when it boots up then the keyboard works fine. If I switch away to the Windows box the keyboard still works fine, but if I switch back to Linux I start getting missed and repeated keystrokes, making it ... |
Starting the X server and then exiting it seems to fix the problem. A bit heavy-handed, but better than rebooting.
| How to reset keyboard driver? |
1,331,741,565,000 |
Version of affected software:
$ rpm -q --whatprovides /usr/bin/Xorg
xorg-x11-server-Xorg-1.19.6-8.fc28.x86_64
(In other words, this is on a currently up-to-date install of Fedora 28 Workstation).
Steps to reproduce:
Use ctrl+alt+f5, to switch to text vt 5 and log in
sudo -i
Xorg :10
Use ctrl+alt+f6, to switch to tex... |
You are mis-remembering how Xorg used to work :). Remember that X used to start on VT7 and up, because VT1 through VT6 were reserved for text consoles.
With systemd and logind, by default the VTs are set up on-demand. If you never switched to VT2, then getty and login are not started on VT2. Instead, VT2 remains ava... | Why is VT switching not working for Xorg run as root? |
1,331,741,565,000 |
With Alt + Fn you can switch between virtual consoles in most Linux distributions. What application handles the switching of consoles and how? I suppose it has to read the keyboard input before all other processes. Or is it handled by a device driver or another kernel module?
|
There's a terminal emulator program built into the Linux kernel. It doesn't manifest as a running process with open file handles. It's layered on top of the framebuffer and the input event subsystem, which it uses internal kernel interfaces to access. It presents itself to application-mode systems as a series of ke... | What application manages the consoles |
1,331,741,565,000 |
As far as I've understood, a terminal emulator is a GUI-based program which gives me a terminal-like viewport and allows me to interact with it just like I'd do with a terminal, except that it has all the support from the X system, so I suspect that ssh user@ip will not give me access to a terminal emulator running o... | ERROR: type should be string, got "\nhttps://unix.stackexchange.com/a/4132/153329\n\npseudo-ttys, are provided (through a thin kernel layer) by programs called terminal emulators, such as Xterm (running in the X Window System), Screen (which provides a layer of isolation between a program and another terminal), Ssh(which connects a terminal on one machine with programs on another machine)\n\nWith ssh user@ip you get shell running in pseudo-terminal (not X11 terminal emulator).\nWith ssh -X you get X11 forwarding - an SSH protocol that enables users to run graphical applications on a remote server and interact with them using their local display and I/O devices.\nX11 uses a client-server model, where an X Server is a program on a machine which manages access to graphical displays and input devices (monitors, mice, keyboards, etc.), and an X Client is a program which handles graphical data.\nX Servers and X Clients can communicate over remote network.\n" | Does ssh give access to the virtual console, to a terminal emulator, or what? [duplicate] |
1,331,741,565,000 |
I am using Artix Linux with OpenRC.
I want to define a custom console keymap to generally use the US-design, but add some extra functionality for German umlauts. The following does work:
/usr/share/keymaps/i386/qwerty/mymap.map:
include "us.map"
altgr keycode 30 = adiaeresis
Activating with rc-update add keymaps boo... |
Okay, I found an alternative way to declare it that works: the number system described in the manpage of keymaps. Note that in /usr/share/keymaps/i386/qwerty/us.map.gz (unpacked), there is the line keymaps 0-2,4-6,8-9,12, ommitting 3, which is what I need (Shift+AltGr). So my file now looks like this, and that works f... | shift altgr combination for console keymap |
1,331,741,565,000 |
In the Linux source code, specifically in linux/drivers/video/console/vgacon.c, there is a switch case block for cursor shapes. Each of these shapes are rectangles of the same width and varying heights. Clearly, Linux handles the height of the cursor, but does it handle the width? Does Linux choose the width, or does ... |
In vgacon, the hardware chooses the width, and it’s always the full width of a character cell — that’s all that VGA supports. mdacon is similar, for the same reason.
Other console implementations with cursor size handling can be found by looking for CUR_UNDERLINE. Some of them, such as fbcon, could theoretically suppo... | What handles virtual console cursor specifics? |
1,331,741,565,000 |
I refuse to think solaris 10 no virtual consoles
I did
svcadm enable svc:/system/console-login:default
nothing happen,no virtual consoles,service remain offline
and no error is given
if i start the script of this smf service give me this command
/usr/lib/saf/ttymon -g -d /dev/console -l console -m ldterm,ttcompat -h ... |
Solaris 10 does not have virtual consoles. The were not introduced to Solaris until Solaris 11.
The major customers for Solaris tend to be large-scale enterprises, where the ability to use virtual consoles isn't needed as much as it is for desktop systems.
| solaris 10..no virtual consoles? |
1,331,741,565,000 |
Why are there so many ttys? Are multiple tty necessary?
Why are multiple things spread in different ttys? For eg i have the runit logs on tty1, wm on tty7, and a blinking white cursor on the corner of screen on tty8. Why not everything in one tty?
Why doesn't linux place these in order - tty1: runit logs, tty2: wm, e... |
Why are there so many ttys?
In the past there was no graphical subsystem, no apps like screen/tmux, so multiple consoles allowed to be able to easily switch between multiple running tasks [under multiple users] simultaneously.
Are multiple tty necessary?
No, you may as well have a single one.
Why are multiple thi... | Questions about tty |
1,411,588,936,000 |
There is apparently a vulnerability (CVE-2014-6271) in bash: Bash specially crafted environment variables code injection attack
I am trying to figure out what is happening, but I'm not entirely sure I understand it. How can the echo be executed as it is in single quotes?
$ env x='() { :;}; echo vulnerable' bash -c "ec... |
bash stores exported function definitions as environment variables. Exported functions look like this:
$ foo() { bar; }
$ export -f foo
$ env | grep -A1 foo
foo=() { bar
}
That is, the environment variable foo has the literal contents:
() { bar
}
When a new instance of bash launches, it looks for these specially c... | What does env x='() { :;}; command' bash do and why is it insecure? |
1,411,588,936,000 |
Can I disable Spectre and Meltdown mitigation features in Ubuntu 18.04LTS?
I want to test how much more performance I gain when I disable these two features in Linux, and if the performance is big, to make it permanently.
|
A number of kernel boot parameters are available to disable or fine-tune hardware vulnerability mitigations:
for Spectre v1 and v2: nospectre_v1 (x86, PowerPC), nospectre_v2 (x86, PowerPC, S/390, ARM64), spectre_v2_user=off (x86)
for SSB: spec_store_bypass_disable=off (x86, PowerPC), ssbd=force-off (ARM64)
for L1TF: ... | Disable Spectre and Meltdown mitigations |
1,411,588,936,000 |
Security researchers have published on the Project Zero a new vulnerability called Spectre and Meltdown allowing a program to steal information from a memory of others programs. It affects Intel, AMD and ARM architectures.
This flaw can be exploited remotely by visiting a JavaScript website. Technical details can be f... |
Alan Cox shared a link from AMD's blog:
https://www.amd.com/en/corporate/speculative-execution
Variant One: Bounds Check Bypass
Resolved by software / OS updates to be made available by system
vendors and manufacturers. Negligible performance impact expected.
Variant Two: Branch Target Injection
Differences in AM... | How to mitigate the Spectre and Meltdown vulnerabilities on Linux systems? |
1,411,588,936,000 |
According to the Intel security-center post dated May 1, 2017, there is a critical vulnerability on Intel processors which could allow an attacker to gain privilege (escalation of privilege) using AMT, ISM and SBT.
Because the AMT has direct access to the computer’s network hardware, this hardware vulnerability will a... |
The clearest post I’ve seen on this issue is Matthew Garrett’s (including the comments).
Matthew has now released a tool to check your system locally: build it, run it with
sudo ./mei-amt-check
and it will report whether AMT is enabled and provisioned, and if it is, the firmware versions (see below). The README has m... | How to detect and mitigate the Intel escalation of privilege vulnerability on a Linux system (CVE-2017-5689)? |
1,411,588,936,000 |
Yeah, I know what you are thinking: "Who on earth names their file `a`b?"
But let us assume you do have a file called `a`b (possibly made by a crazy Mac user - obviously not by you), and you want to rsync that. The obvious solution:
rsync server:'./`a`b' ./.;
rsync 'server:./`a`b' ./.;
gives:
bash: line 1: a: command... |
Having manually bisected, this is a bug in rsync and is fixed by commit 5c93dedf4538 ("Add backtick to SHELL_CHARS."), which will be in the upcoming rsync 3.2.8 (not yet released). It was broken by commit 6b8db0f6440b ("Add an arg-protection idiom using backslash-escapes"), which is in 3.2.4.
As a mitigation, an optio... | rsync the file `a`b |
1,411,588,936,000 |
The Armis Lab has discovered a new vector attack affecting all devices with Bluetooth enabled including Linux and IoT systems.
BlueBorne attack on Linux
Armis has disclosed two vulnerabilities in the Linux operating system which allow attackers to take complete control over infected devices. The first is an informati... |
The coordinated disclosure date for the BlueBorne vulnerabilities was September 12, 2017; you should see distribution updates with fixes for the issues shortly thereafter. For example:
RHEL
Debian CVE-2017-1000250 and CVE-2017-1000251
Until you can update the kernel and BlueZ on affected systems, you can mitigate th... | How do I secure Linux systems against the BlueBorne remote attack? |
1,411,588,936,000 |
Since this bug affects so many platforms, we might learn something from the process by which this vulnerability was found: was it an εὕρηκα (eureka) moment or the result of a security check?
Since we know Stéphane found the Shellshock bug, and others may know the process as well, we would be interested in the story of... |
To reassure a few, I didn't find the bug by observing exploits, I have
no reason to believe it's been exploited before being disclosed
(though of course I can't rule it out). I did not find it by
looking at bash's code either.
I can't say I remember exactly my train of thoughts at the time.
That more or less came from... | How was the Shellshock Bash vulnerability found? |
1,411,588,936,000 |
Does the Ghost Vulnerability require access (as in being a logged in user) to the effected OS in question? Can someone clarify the 'remote attacker that is able to make an application call'? I only seem to find tests to run on the local system directly but not from a remote host.
All the information I have gathered so... |
Answer to my question, from Qualys:
During our testing, we developed a proof-of-concept in which we send a
specially created e-mail to a mail server and can get a remote shell
to the Linux machine. This bypasses all existing protections (like
ASLR, PIE and NX) on both 32-bit and 64-bit systems.
My compiled re... | Ghost Vulnerability - CVE-2015-0235 |
1,411,588,936,000 |
My dmesg output contains the following line:
[ 0.265021] MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more details.
Having gone to the above-mentioned site and having read up on MDS a little, I ran/received the following:
$ cat /s... |
Can I do anything further to protect my system, and if so, what should my next steps be?
You can do something further to protect your system: you can disable SMT (hyperthreading). This is usually possible in your system’s firmware setup.
Do I need to take action regarding my Microarchitectural Data Sampling (MDS) s... | Do I need to take action regarding my Microarchitectural Data Sampling (MDS) status? |
1,411,588,936,000 |
According to cve.mitre.org, the Linux kernel before 4.7 is vulnerable to “Off-path” TCP exploits
Description
net/ipv4/tcp_input.c in the Linux kernel before 4.7 does not properly determine the rate of challenge ACK segments, which makes it easier for man-in-the-middle attackers to hijack TCP sessions via a blind in-... |
According to LWN there is a mitigation which can be used while you do not have a patched kernel:
there is a mitigation available in the form of the
tcp_challenge_ack_limit sysctl knob. Setting that value
to something enormous (e.g. 999999999) will make it
much harder for attackers to exploit the flaw.
You shou... | How do I protect my system against the Off-path TCP exploit in Linux? |
1,411,588,936,000 |
In wake of the newly-discovered POODLE vulnerability, I'd like to disable SSLv3 on all of my SSH servers. How do I achieve this with OpenSSH?
|
This is not an issue for OpenSSH since it doesn't make use of SSL.
excerpt - What is the difference between SSL vs SSH? Which is more secure?
They differ on the things which are around the tunnel. SSL
traditionally uses X.509 certificates for announcing server and client
public keys; SSH has its own format. Also... | How do I disable SSLv3 in an OpenSSH SSH server to avoid POODLE? |
1,411,588,936,000 |
Since Intel, AMD and ARM is affected by the Spectre and Meltdown cpu kernel memory leak bugs/flaws, could we say that Power architecture is safe from these?
|
No, you could not say it's safe.
https://www.ibm.com/blogs/psirt/potential-impact-processors-power-family/
Complete mitigation of this vulnerability for Power Systems clients involves installing patches to both system firmware and operating systems. The firmware patch provides partial remediation to these vulnerabili... | Is AIX/Power safe from Spectre / Meltdown? |
1,411,588,936,000 |
Notice: the very same vulnerability has been discussed in this question, but the different setting of the problem (in my case I don't need to store the passphrase) allows for a different solution (i.e. using file descriptors instead of saving the passphrase in a file, see ilkkachu's answer).
Suppose I have a symmetric... |
gpg --passphrase $my_passphrase
My question: is this safe? Will the variable $my_passphrase and/or the decrypted output be visible/accessible in some way?
No, that's not really considered safe. The passphrase will be visible in the output of ps, just like all other running processes' command lines. The data itself... | Security of bash script involving gpg symmetric encryption |
1,411,588,936,000 |
The Terrapin Attack on SSH details a "prefix truncation attack targeting the SSH protocol. More precisely, Terrapin breaks the integrity of SSH's secure channel. By carefully adjusting the sequence numbers during the handshake, an attacker can remove an arbitrary amount of messages sent by the client or server at the ... |
This sounds like a big scarry attack, but it's an easy fix. To mitigate the attack, see my Thwarting the Terrapin Attack article for SSH configuration details. Specifically you need to block the ETM HMACs and ChaCha20 cipher as follows:
For recent RHEL-based Linux systems (Alma, Rocky Oracle, etc), this will work:
# ... | How do you mitigate the Terrapin SSH attack? |
1,411,588,936,000 |
I upgraded my old Debian 6.0 (Squeeze) server, but still the vulnerability seems to be there:
$ env x='() { :;}; echo vulnerable' bash -c 'echo hello'
vulnerable
hello
How do I upgrade Bash to a newer version on Debian 6.0 (Squeeze)?
|
To get updates on older releases you will probably need to add the Debian 6.0 (Squeeze) LTS repository to your sources.list.
To add this repository, edit /etc/apt/sources.list and add the following line to the end of the file.
deb http://ftp.us.debian.org/debian squeeze-lts main non-free contrib
Then run:
apt-get upd... | Bash vulnerability CVE-2014-6271 (Shellshock) fix on Debian 6.0 (Squeeze) [duplicate] |
1,411,588,936,000 |
I have some servers running Ubuntu 18.04.5 LTS
In last update of sudo package I can see that sudo:amd64 1.8.21p2-3ubuntu1.4 has been installed on 26/01/2021 (the same day that Heap-based buffer overflow in Sudo vulnerability, CVE-2021-3156 was published)
As per this list , sudo version 1.8.21p2 is impacted by this vu... |
The list of versions you’re looking at only documents versions of sudo released by the sudo project itself. Distributions such as Ubuntu typically add patches to address such security vulnerabilities, instead of upgrading to the latest version of sudo.
To determine whether your version is affected, you need to look at... | Heap-based buffer overflow in Sudo vulnerability - sudo version impacted? |
1,411,588,936,000 |
I used the spectre-meltdown-checker, version 0.42, without any option resulting in all-green results. But, in a help page, I found the --paranoid switch, which resulted in about a half of later CVEs to become red. I read what it told me, that for full mitigation I would have to disable hyper-threading, it scared me of... |
I did a little bit of digging, and this vulnerability in the documentation is referred to as:
L1TF = L1 Terminal Fault
Actually I found the kernel documentation directly, a quote:
l1tf= [X86] Control mitigation of the L1TF vulnerability on
affected CPUs
The kernel PTE inversion protection is uncondi... | L1D unconditional flushing should be enabled to fully mitigate the vulnerability (CVE-2018-3646) |
1,411,588,936,000 |
By checking the state of installed package using the pkg audit -F tool on freeBSD 11 , I have found 4 vulnerability on the installed packages (installed through pkg) : samba ,OpenEXR , kdelibs and ImageMagick .
I have upgraded ImageMagick and samba to the latest version ( + following the mitigation guide for samba :... |
KDE bug - No mitigation. Update to kauth >= 5.34 and kdelibs >= 4.14.32 (when released) is the solution provided by KDE folks. Just wait for the updated port to have this problem fixed.
OpenEXR bugs - No mitigation, and the devs are not showing any sign that they will fix this soon. Best guess here is to remove this ... | How to mitigate the multiple vulnerability : remote code execution and local privilege escalation on FreeBSD 11? |
1,411,588,936,000 |
I'm updating my kernel to protect my system against the "Retbleed" exploit, and I know that affected 32-bit things haven't received the necessary mitigations. I'm wondering which 32-bit features I need to disable in the Linux kernel to be fully protected.
I've found CONFIG_X86_X32_ABI and CONFIG_IA32_EMULATION so far.... |
Running a 32-bit kernel.
If you're able to turn on CONFIG_IA32_EMULATION, then you're not running a 32-bit kernel.
You're running a 64-bit kernel. This is the correct type of kernel for you to run. No configuration change is required.
https://lore.kernel.org/lkml/Ys%[email protected]/
We are booting the i386 kern... | Which 32-bit features are still vulnerable to "Retbleed" in the Linux kernel? |
1,411,588,936,000 |
I'm running Debian Buster (10.3) on a ThinkPad T420 (i5-2520M), current intel-microcode package is installed. To check for known CPU vulnerabilities I used the spectre-meltdown-checker script (https://github.com/speed47/spectre-meltdown-checker) which resulted in this output:
According to the script all CVEs related ... |
Both tools agree; by default, spectre-meltdown-checker flags vulnerabilities as fixed even when SMT is an issue. If you add the --paranoid flag you should see a number of green boxes change to red.
On your setup, all the available fixes are applied on your system, apart from disabling SMT which is your decision to mak... | How to check for MDS vulnerability? |
1,411,588,936,000 |
I've CentOS 6.0 server with glibc-2.12-1.7.el6.x86_64 running many open source services and some of my own C programs.
To fix ghost vulnerability, I need to update it to glibc-2.12-1.149.el6_6.5.
Since the version difference seems large.
I was wondering whether I need to recompile my C/C++ apps or even some of the ... |
Linux applications almost always use dynamic linking to the C library, meaning it is not compiled into them -- it is linked at runtime. This means if you have upgraded the C library, you should not have to do anything else.
However, while it would be very unusual, it is not impossible for things to be built with a st... | Ghost vulnerability - recompile C/C++ programs? |
1,411,588,936,000 |
I really really hope I'm wrong here, but it seems that Debian 11 has a vulnerable version of OpenSSH.
My OpenSSH banner reports my OpenSSH version is:
8.4p1 Debian 5+deb11u1
I checked with sshd and it reports the same version.
According to this CVE-2023-38408 ANY version before 9.3p2 is vulnerable.
I tried sudo apt up... |
At the time of writing (17 August 2023) the page of CVE-2023-38408 on the Debian security tracker says that:
Debian 10 (buster, security channel) is fixed
Debian 10 (buster) is vulnerable
Debian 11 (bullseye) is vulnerable
Debian 12 (bookworm) is vulnerable
Debian 13 (trixie) is fixed
Debian Unstable (sid) is fixed
... | Are all Debian 11 systems automatically vulnerable to CVE-2023-38408? |
1,411,588,936,000 |
I need to write some kind of bash script that would check conf files of services (commonly used as nginx apache mongodb cassandra ssh etc) and search for patterns (i.e. check if mongod.conf has authorization: enabled line or check if ssh logging via keys is enabled, also checking if every service is in it newest vers... |
The thing what you are asking for to me it seems like writing standard monitoring scripts.
The best way to approach it is to settle on some programming language and use it to write them all.
Bash scripting is not the best choice as it's flaky for some operations - it can do a lot, but it's huge problem with maintainin... | Check service for vulnerabilities [closed] |
1,411,588,936,000 |
Wanting to setup Nmap on my Ubuntu 14.04 LTS system to detect HeartBleed vulnerability. I followed the instructions here:
http://cyberarms.wordpress.com/2014/04/20/detecting-openssl-heartbleed-with-nmap-exploiting-with-metasploit/
To create the script files and place them in the proper directory. However the script th... |
I wrote this script, and my official guide is available here. The simplest solution is to upgrade to the latest Nmap (version 6.47 as of this writing).
| Nmap script execution to detect heartbleed is failing |
1,411,588,936,000 |
I'm studying the vulnerabilities of an old version of Apache, the 1.3.34. And I don't quite understand in what exact situation the CVE 2006-7098 vulnerability can be exploited. The README included in the exploit states that:
Local attacker can influence Apache to direct commands
into an open tty owned by user w... |
So, after rereading the exploit info several times, I've certain doubts about the phrase local attacker: does it mean that the vulnerability can only be exploited from the same machine where the vulnerable Apache is running? In that case I understand that the attacker should have a priori the credentials of a valid u... | Does CVE 2006-7098 require access (being a logged in) to the vulnerable Debian? |
1,411,588,936,000 |
On Linux Mint 20.1 Ulyssa, I have received a security update to patch tow security flaws leading to a local privilege escalation without password for all unpatched sudo version before 1.9.5 version and here is a part of the change log:
sudo (1.8.31-1ubuntu1.2) focal-security; urgency=medium
* SECURITY UPDATE: dir e... |
CVE-2021-3156 is fixed by sudo 1.8.27-1+deb10u3.
Both CVE-2021-23239 and CVE-2021-23240 are mitigated by fs.protected_symlinks, which is set to 1 by default in Debian 10: this setting only allows symlinks to be followed if they are outside a sticky world-writable directory (such as /tmp), or when the uid of the symlin... | How to patch sudo vulnerabilities on debian leading to a local privilege escalation CVE-2021-23239 and CVE-2021-3156 (aka Baron Samedit)? |
1,411,588,936,000 |
I run multiple distributions of Linux. I am researching how to patch against KRACK.
The package that is vulnerable in Linux is 'wpa_supplicant'.
According to the Vendor Responses the "Linux patch" for wpa_supplicant can be found here, whereas the (for example) Fedora patch can be found here and the Debian patch can b... |
This question is like what do a distribution?
Distribution adapt and integrate the packages in the overall distribution, e.g. PATH, manuals, init scripts, logs, cronjob, firewall, etc. Additionally they configure the package to be used and integrated with specific other packages (which crypto library version, which r... | Is a package specific to a Linux distribution? How to protect against KRACK |
1,411,588,936,000 |
I need some information regarding the possible attack vector on *nix platforms of running su/sudo.
Can an malicious process wait for the user to run su or sudo and then exploit that root access somehow? Or is this already protected somehow?
For example, if /dev/tty2 has impersonated root with su:
# inject text
echo A... |
Yes, a process can inject input into a tty via the TIOCSTI ioctl. At least on Linux, that's subject to some restrictions: the user should be root (CAP_SYS_ADMIN) or inject into its controlling tty.
That's still quite dangerous, and TIOCSTI was gutted in systems like OpenBSD, but its threat model was usually backwards ... | Can a process send keystrokes or read text to/from a tty that is running su/sudo? |
1,411,588,936,000 |
The question on this site: "When was the shellshock (CVE-2014-6271/7169) bug introduced, and what is the patch that fully fixes it?" explains how the vulnerability has been cured, but does not, as far as I can see, explain what is necessary for individuals to do on their own computers. Is there any need for further a... |
Following the comments,I have done this, and am satisfied that I am up-to-date.
[Harry@localhost]~% rpm -qv bash
bash-4.2.48-2.fc20.i686
[Harry@localhost]~% env X='() { (a)=>\' sh -c "echo date"; cat echo
date
cat: echo: No such file or directory
[Harry@localhost]~%
| Is there any need to take further action over ShellShock [closed] |
1,376,072,718,000 |
I have an NIC card on a Debian machine somewhere. The machine is turned off, but I need to know whether the NIC card is turned on so that I can send a wake-on-lan magic packet later (from another Debian machine) to wake it up. I have the MAC address of the card. Is there any way I can ping the ethernet card by MAC to ... |
You might have better luck using the tool arping instead. The tool ping works at the layer 3 level of the OSI model, whereas arping works at layer 2.
You still need to know the IP of the system however with this tool. There are 2 versions of it, the standard one included with most Unixes (Alexey Kuznetsov's) is the ve... | Can one ping a NIC by MAC |
1,376,072,718,000 |
I'm writing a wake on lan script for a set of our lab computers. We have sqlite db with a list of the computer hostnames, IPs, and MACs and currently I ping each of them with '-c1' so it doesn't run endlessly - but even that takes some waiting, is there a quicker way to get answer rather than ping? Using ping seems to... |
Sending a single packet and waiting for a response is going to be one of the fastest possible ways, and ping is a fine way to do that. In fact, depending on your use case, I'd argue that it's too fast, since it doesn't really tell you if the system is actually doing anything useful, just that the kernel's network subs... | Faster way than ping for checking if computer online? |
1,376,072,718,000 |
I have been using Wake-on-LAN successfully for many years now for a number of my Linux devices. It works well enough.
However, I also have a Mac Mini at home. I have noticed that it goes to sleep and has two distinct properties separate from any Linux machine I have while asleep:
It still responds to ping on the netw... |
ethtools will help you, but the hardware must allow your needs.
# ethtool interface | grep Wake-on
# ethtool eth0 | grep Wake-on
Supports Wake-on: pumbag
Wake-on: d
according to ArchLinux's wiki :
The Wake-on values define what activity triggers wake up:
d (disabled)
p (PHY activity)
u (unicast activity)
m ... | Wake-on-LAN via SSH |
1,376,072,718,000 |
I'm looking into installing a file server on my network, for serving data and backups.
I want this machine to be available at all times, but I would rather not keep it on all the time (as to conserve power).
Is it possible to set things up so that the thing automatically suspends (or powers off) after some time and th... |
OS X can do this now, as of Snow Leopard. It's made possible through the Sleep Proxy Service. It's pretty much automatic. The only requirement is that you have a second always-on Apple device on your LAN that can act as the sleep proxy. Their current low-power embedded boxes all support this, I believe: Airport, T... | How to power off a system but still keep it available on the network |
1,376,072,718,000 |
We need to wake-up some computers on our internal LAN, from the Internet.
We have a somewhat closed router, with very few ways to configure it.
I'd like to use netfilter (iptables) to do this because it doesn't involve a daemon or similar, but other solutions are okay.
What I have in mind:
the external computer iss... |
socat is a killer utility. Put this somewhere in your init scripts:
socat -u -T1 UDP-LISTEN:1234,fork,range=<ip address of source>/32 UDP-DATAGRAM:255.255.255.255:5678,broadcast
Some users have problems with UDP-LISTEN, so using UDP-RECV seems better (warning: could send the broadcast packets in an endless loop):
soc... | Transform a UDP unicast packet into a broadcast? |
1,376,072,718,000 |
Is it possible to implement the wake-on-lan magic packet in bash? I'm using a old, customized BusyBox and don't have ether-wake. Is it possible to replace it with some other shell command, like:
wakeonlan 11:22:33:44:55:66
|
You need something that's capable of sending an Ethernet packet that will be seen by the device you want to wake up.
The ether-wake command in BusyBox is exactly what you're after. If your BusyBox doesn't have it, consider recompiling BusyBox to include it.
If you have a sufficiently “bloaty” netcat (BusyBox can have ... | Wake-on-LAN with BusyBox? |
1,376,072,718,000 |
I have a new GNU/Linux Debian 9 server installation.
This is what I get from ethtool:
root@web-server:~# ethtool enp2s0
Settings for enp2s0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
... |
A WoL magic packet can be sent either to UDP port 0, 7, or 9 (depending on the hardware in use) or as a raw Ethernet packet of type 0x0842. wolcmd has elected to use the former method, defaulting to port 7.
Note that wolcmd does support UDP broadcast, meaning that you can specify 255.255.255.255 as the address and mas... | Why am I required to use an IP address when Waking-on-LAN a computer? |
1,376,072,718,000 |
Windows also has Wake on Lan that allows a computer to be woken up from sleep; additionally, this can be disabled by a user on said computer.
I know that WoL exists on Linux, but how does one disable it?
|
You can check the setting for an interface, say eth0, with ethtool:
$ sudo ethtool eth0 | grep Wake
Supports Wake-on: pumbg
Wake-on: g
From the ethtool man page you can disable it with
$ sudo ethtool -s eth0 wol d
Where this gets configured depends on what you use to start your network.
archlinux gives some... | How to disable Wake on Lan |
1,376,072,718,000 |
Is there any (reliable) way to find out if the PC booted because of a Wake-on-LAN Packet instead of pressing the power button? I want automatically check if WOL is correctly configured.
I know about ethtool's WOL output, but this just tells me if WOL is turned on, not how the PC booted, right?
|
Manually testing using etherwake
I think you can test it using a tool like etherwake. Depending on the distro it's called etherwake on Ubuntu/Debian, ether-wake on RHEL/CentOS/Fedora. I had it installed already by default on Fedora, it's part of the net-tools package.
To use it:
# Redhat
$ ether-wake 00:11:22:33:44:55... | Find out if computer started via Wake-on-LAN or power button? |
1,376,072,718,000 |
I have machine at the office which is shut off I was hoping to turn it on from home using wake on lan. Reading about this, I have realized that I need the MAC address of the machine. Is there a way to find the MAC address of the machine from my ssh connection history?
I use an RSA key to connect to the machine.
|
No, ssh has nothing to do with MAC addresses. If you are using DHCP you can maybe look into the logs or configuration files to determine the mac address.
| Is there a way to find the mac address of a remote machine I have connected to with ssh? |
1,376,072,718,000 |
I was wondering if it were posible to make my server go to sleep after a set period of time, but still be listening for lan requests. I use my server as a media server that might get used 3 or 4 hours a day and it is really a waste of power to have it running all the time. However I don't want to run up to the second ... |
Wake on LAN is a BIOS and NIC feature, not an OS feature, that is, you need a supporting BIOS and NIC to do it.
Once you've enabled it in your BIOS (if you can), you can check if your NIC has WOL support enabled by checking the output of ethtool [interface].
If the value of Supports Wake-on contains g, your NIC suppor... | lts is there a way to enable sleep mode and wake on lan? |
1,376,072,718,000 |
I want to listen for WOL (Wake-On-LAN) packets.
As WOL packets can be UDP/TCP/whatever (yes, even TCP, but probably useless), I have to check every incomming packets for the WOL specific pattern.
This can't be done directly with netfilter because the pattern is 6xFF + 16xtarget-MAC-address (so we have 96 variable byte... |
With ngrep, you can do this:
ngrep '\xff{6}(.{6})\1{15}'
That matches 0xff 6 times, followed by any 6 bytes, followed by those same 6 bytes repeated 15 more times. I confirmed that matches a packet generated by wakeonlan.
ngrep has options that are useful for scripting (e.g., -W single to have a single line per match... | Deep packets inspection to detect WOL |
1,376,072,718,000 |
is there a tool/daemon available that automatically fills /etc/ethers in the background with the proper hostname:mac pairs to have a up to date database when needed with for example wake on lan (wol) ? maybe something that does not "scan" the network, but cassually dumps the arp cache or something ?
thanks
|
A tool that will handle the majority of this is arpwatch. By default (on Debian, at least) is that it writes to /var/lib/arpwatch/arp.dat. This file is flushed and updated each time arpwatch is stopped.
The file contains entries of this form:
52:54:00:aa:bb:cc 192.168.1.2 1452252063 somehostname eth0
The /etc/eth... | is there a tool/daemon that automatically fills /etc/ethers in the background to have a proper wake on lan hostname:mac database when needed? |
1,376,072,718,000 |
I have an untangle box (debian 10 underneath) that I am attempting to forward a WOL packet from a host in one subnet to a host in another subnet.
My initial solution to this was to use knockd, listen for a syn packet on one of its interfaces on one subnet, then execute a etherwake command on the other subnet to wake u... |
The issue of waking an host is that to send it a packet, the network stack must know the MAC address of the NIC. Normally it's dynamically handled by ARP. If the MAC entry has been evicted from the router's ARP table, when the host is asleep it can't answer the ARP query, thus the router can't get the MAC address need... | Debian Wake on LAN Packet Forwarding? |
1,376,072,718,000 |
I wrote a small application, which runs etherwake. From bash it works fine and wakes up another PC. But if it is launched from crontab, then nothing happens.
Has anyone encountered a similar problem and how to solve it?
Note: Maybe it matters, that the app is written with Qt/C++, etherwake runs via QProcess and OS is... |
I am replying to this message because I was struggling with the same issue.
The problem seems to lie in the etherwake path. Crontab runs commands by default in /bin. But etherwake is located in sbin.
/usr/sbin/etherwake
So instead of doing:
00 06 * * * etherwake -i wlan0 00:11:22:33:44:55
The proper way is:
00 06 *... | Cron and etherwake on Raspbian |
1,376,072,718,000 |
I am trying to get Wake-on-LAN (WoL) to work on my desktop. It has an Asus P6T Deluxe v2 motherboard and I have successfully enabled the WoL option within the BIOS power management [1]. The desktop is currently configured as a dual boot of Windows 7 and Arch Linux. On Windows 7 I am able to boot using WoL, but on my A... |
After experimenting with the BIOS settings I finally was able to get Linux to boot using WoL! Apparently I had to enable both Power On By PCI Devices and Power On By PCIE Devices for it to boot under Linux using WoL. To be sure that was the cause I tried all combinations.
Just to be thorough I tried disabling them bo... | How can I boot my desktop using Wake-on-LAN? |
1,376,072,718,000 |
Following these instructions, I found that phy0 on my desktop should support wake on wlan and turned it on.
[root@Arch alex]# iw phy0 wowlan show
WoWLAN is enabled:
* wake up on magic packet
However, when I suspend the system and try to wake it up from a distance, it doesn't work:
[alex@Archlaptop tmp]$ wol 44:E5:17... |
I found the problem: I had to use wakeonlan with the -i=<ip> option (with ip of course replaced with the ip of the system).
| Wake on wlan should work but doesn't |
1,376,072,718,000 |
I'm having some trouble with Wake on LAN through PHY and unicast. I'm able to wake the system by pinging or sshing the shut down machine, but only within the first ~30 seconds. Why's that, what could be the cause?
I put a script 70wol into /usr/lib/pm-utils/sleep.d and made it executable, it obviously is executed sinc... |
Ok, silly me did not think about the fact, that Windows and Linux per default have an ARP timeout of exactly 30 seconds as one can see by doing a
netsh interface ipv4 show interface 2
in cmd.exe, where the 2 has to be replaced with the Idx of your NIC, one gets by issuing
netsh interface ipv4 show interfaces
On Li... | Wake on LAN through PHY and unicast only works in the first ~30 seconds after pm-suspend |
1,376,072,718,000 |
I'm having an issue with ssh. My idea was to set up Wake on Lan on my pc, which runs Kali Linux Rolling (2008.1), and using ssh to connect to it after it booted.
Everything works fine, except for the fact that after the pc is booted I can't connect to ssh. To do that, I need to log on from my pc, start ssh and then ... |
systemctl enable sshd.service
This will set ssh to automatically start.
| How to start sshd automatically [closed] |
1,376,072,718,000 |
I have been trying to set up an environment for my hypervisor, which is just a Debian Bookworm running qemu.
I have been using the web interface Cockpit to help me see things when the terminal is too arid. But in doing so, I had to switch from using systemd-nerworkd to NetworkManager.
Recently, I learned how to create... |
Wake-On-LAN is a hardware feature: it's not intended to reach the main interface participating in routing: the bridge, but always the physical interface: the actual NIC interface set as bridge port. The usual method used for Wake-On-LAN is to use the Magic Packet (original 1995 AMD white paper: PDF), rather than other... | Wake On Lan using a nic attached to a NetworkManager bridge interface |
1,376,072,718,000 |
So i've seen the WOL scripts and they seem like they could work well when i'm trying to connect from a computer that is outside my router.
Script i'm using:
http://www.dd-wrt.com/wiki/index.php/Useful_Scripts#Web_Server_Wake-up
Now the problem that i see is that when ever i'm home the WOL script will be useless bec... |
Solved it by moving the server in question to a dedicated VLAN and then logging the traffic between it and the rest of the network by using specific iptable rules triggered on some ports.
I will have a full writeup on my site when i finish the project and will update this answer then.
| Use DD-WRT to auto WOL when traffic is on same subnet |
1,376,072,718,000 |
I want to use wake on lan via my custom router. Below image is my networking image. I could make connection from smart phone to raspi3 using google cloud platform and VPN (softether), and from raspi3 to Desktop PC when the Desktop PC turns on.
However, when the Desktop PC turns off, eth1 is not assigned IP address. So... |
Simple Answer
I think you're going about this the wrong way. The simple way to achieve this is that you don't need to assign it an IP address. Send the WOL packet to your LAN's broadcast address. This is almost always the last address in the subnet. So if your LAN is on 192.168.1.x with subnet mask 255.255.255.0 t... | Wake on lan via my custom router |
1,450,248,929,000 |
At shutdown I often get the message
watchdog did not stop!
and then the laptop freezes after few other lines without shutting down.
Any idea on how to fix this? Recently it happened very often, usually when the laptop was powered on for some time.
I am using Debian 8 on an Asus UX32LA
I found this systemd file (it s... |
The watchdog did not stop! line is normal behavior. systemd sets a "hardware watchdog" timer as a failsafe, to ensure that if the normal shutdown process freezes/fails that the computer will still shutdown after the specified period of time. This time period is defined in the variable ShutdownWatchdogSec= in the file ... | message at shutdown: watchdog did not stop! |
1,450,248,929,000 |
Quite often times when I do a reboot, I get the following error message:
kernel: watchdog watchdog0: watchdog did not stop!
I tried to find out more about watchdog by doing man watchdog, but it says no manual entry. I tried yum list watchdog and found that it was not installed. However, when I look at the /dev direct... |
Most modern PC hardware includes watchdog timer facilities. You can read more about them here via wikipedia: Watchdog Timers. Also from the Linux kernel docs:
excerpt - https://www.kernel.org/doc/Documentation/watchdog/watchdog-api.txt
A Watchdog Timer (WDT) is a hardware circuit that can reset the
computer system ... | Do I own a watchdog? |
1,450,248,929,000 |
Why we need to keep the nmi_watchdog enabled and what could happen if I disable it permanently ?
As some applications recommends to disable NMI watchdog to work properly, what's the advantage of disabling it ?
And what does the results of this command, grep -i nmi /proc/interrupts mean ?
NMI: 24 18 ... |
Q3: What do the results of grep -i nmi /proc/interrupts mean?
It becomes clearer if you see the headings of the columns:
$ cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
NMI: 24 18 21 18 Non-maskable interrupts
This command displays statistics abou... | Should I disable NMI watchdog permanently or not? |
1,450,248,929,000 |
I'm using a Raspberry Pi B, with Raspbian.
After upgrading to Jessie, watchdog daemon doesn't start at boot anymore. Starting it manually using "sudo service watchdog start" does work.
I tried:
purging and reinstalling watchdog
update-rc.d watchdog defaults && update-rc.d watchdog enable
systemctl enable watchdog pro... |
Open
/lib/systemd/system/watchdog.service
and add
[Install]
WantedBy=multi-user.target
Systemd needs the [Install]-Section for a Unit to know how it should enable/disable the Unit.
| Watchdog daemon doesn't start at boot |
1,450,248,929,000 |
Is there a command like
vi > out
vi | out
That I could use to cause a watchdog reset of my embedded linux device?
|
If you have a watchdog on your system and a driver that uses /dev/watchdog, all you have to do is kill the process that is feeding it; if there is no such process, then you can touch /dev/watchdog once to turn it on, and if you don't touch it again, it will reset.
You also might be interested in resetting the device u... | How do I cause a watchdog reset of my embedded Linux device |
1,450,248,929,000 |
On an Orange Pi Zero running a Raspbian server, it's possible to use the watchdog very easily just by running the command echo 1 > /dev/watchdog as root. The idea is that the system will certainly reboot after some time that this command is executed, so I need to keep repeating this command in a regular interval of ti... |
There are two types of watchdog; hardware and software. On the Orange Pi the SOC chip provides a hardware watchdog. If initialised then it needs to be pinged every so often, otherwise it performs a board reset.
However not many desktops have hardware watchdogs, so the kernel provides a software version. Now the ker... | Is it possible to activate the watchdog on any Linux machine? |
1,450,248,929,000 |
Supermicro main boards contain a BIOS feature named "Watch Dog Function". Having Debian 6.0.6 with kernel "Linux debian 2.6.32-5-amd64 #1 SMP" we did:
Change BIOS "Watch Dog Function" from Disabled to Enabled.
Install the package watchdog (# apt-get install watchdog)
Expected: that would be all for the watchdog func... |
1. Load hardware module
Firstly, in order to actually 'feed' the watchdog, you need to have the watchdog hardware module loaded. This may not happen automatically as most watchdog drivers are blacklisted in case there is no watchdog daemon (e.g. in /etc/modprobe.d/blacklist-watchdog.conf on an Ubuntu/Debian system). C... | How to correctly configure Debian watchdog daemon for BIOS Watch Dog? |
1,450,248,929,000 |
After reading this question, I was a little confused; it sounds like some daemon reacting by rebooting a system. Is that right? Is it a common occurrence in embedded *nixes?
|
Having a watchdog on an embedded system will dramatically improve the availability of the device. Instead of waiting for the user to see that the device is frozen or broken, it will reset if the software fails to update at some interval. Some examples:
Linux System http://linux.die.net/man/8/watchdog
VxWorks (RTOS)... | What is a "watchdog reset"? |
1,450,248,929,000 |
Here's a line from a linux syslog:
watchdog[2423]: shutting down the system because of error 101
However, after searching online and in man watchdog, I cannot find any discussion or explanation of the error codes. Is there any such thing?
|
Yes, per the same manual page:
TEST BINARY
If the return code of the check binary is not zero watchdog will assume
an error and reboot the system. A positive exit code is interpreted as
a system error code (see errno.h for details).
so in this particular case (error 101), according to errno.h:
E... | Error codes for watchdog daemon |
1,450,248,929,000 |
The hardware watchdog on my system needs a 0 written to /dev/watchdog at less than 60 seconds interval or it will fire. The file handle must be kept open however or the watchdog is then disabled.
E.g.
echo "0" > /dev/watchdog
does not work, as the file handle is closed after the echo is completed.
Is there any way t... |
while true; do
echo "0"
sleep 30
done > /dev/watchdog
| Any way in Bash to write to a file every X seconds without closing it? |
1,450,248,929,000 |
My systemctl Code dont work
● <appname>.service
Loaded: loaded (/etc/systemd/system/<appname>.service; disabled; vendor prese
Active: failed (Result: exit-code) since Mon 2022-04-04 21:55:20 CEST; 4s ago
Process: 1686 ExecStart=/usr/bin/npm start (code=exited, status=203/EXEC)
Main PID: 1686 (code=exited, sta... |
This is returning 203. That's usually a systemd message.
Exit codes 200 and above are used by systemd's service manager to indicate problems during process invocation.
See man systemd.exec for details.
203 specifically means:
The actual process execution failed (specifically, the execve(2) system call). Most likely ... | Systemctl service failed Exit-code |
1,450,248,929,000 |
I have a Supermicro X9DR3-F motherboard where JWD jumper pins 1 and 2 are shorted and watchdog functionality in UEFI is enabled:
This means that the system is reset after around 5 minutes if nothing resets the hardware watchdog timer. I installed the watchdog daemon and configured it to use iTCO_wdt driver:
$ cat /et... |
The reason watchdog daemon was not able to reset the hardware watchdog timer on Supermicro X9DR3-F motherboard is that the watchdog functionality in UEFI controls the third watchdog. This is on Winbond Super I/O 83527 chip. In other words, iTCO_wdt and ipmi_watchdog drivers were wrong drivers for that watchdog chip.
| watchdog daemon unable to reset hardware watchdog timer on Supermicro X9DR3-F motherboard |
1,450,248,929,000 |
I have configured systemd to use hardware watchdog. My kernel version is 5.10
This is the configuration
RuntimeWatchdogSec=120 in /etc/systemd/system.conf
WatchdogDevice=/dev/watchdog1
I can see that the systemd is kicking the hw watchdog and the system is running fine.
I need to test if this hw watchdog indeed reset... |
Attach a debugger to the systemd process. This will pause it until you detach.
# gdb -p 1
| How to make systemd to stop kicking the hardware watchdog |
1,450,248,929,000 |
I'm struggling with the watchdog timer (wdt) for a while. I can't get it working.
My microcontroller is a AriaG25, based on the AT91SAM925. I have used this tutorial to compile the kernel. The kernel settings related to the wdt looks like this:
CONFIG_WATCHDOG=y
CONFIG_AT91SAM9X_WATCHDOG=y
The kernel has b... |
I've changed my kernel configuration to this:
CONFIG_WATCHDOG=y
CONFIG_SOFT_WATCHDOG=m
CONFIG_AT91SAM9X_WATCHDOG=y
Now my watchdog timer was running. I only had to edit /etc/watchdog.conf in order to set up tests.
| How enable watchdog? |
1,450,248,929,000 |
I have the following situation - I've got a remote PC with an encrypted drive. If the PC needs a restart, I need to be physically present to enter the decryption password because I don't have any way of ssh-ing to it before the OS is loaded.
With this in mind, I use the PC to run my jupyter notebook. Only problem is, ... |
My personal favorite is earlyoom (included and enabled by default in Fedora 32): https://github.com/rfjakob/earlyoom
Otherwise you can choose from:
Nohang: https://github.com/hakavlad/nohang
oomd: https://github.com/facebookincubator/oomd
low-memory-monitor: https://gitlab.freedesktop.org/hadess/low-memory-monitor/
p... | Memory watchdog for hungry applications |
1,450,248,929,000 |
I am trying to enable the watchdog service (on Raspbian Jessie).
I have installed watchdog and (hopefully) configured it.
sudo systemctl start watchdog seems to start it OK
systemctl status watchdog.service shows it running:-
● watchdog.service - watchdog daemon
Loaded: loaded (/lib/systemd/system/watchdog.service;... |
This is a known Debian bug. The systemd integration of the Debian watchdog package has gone through several rounds, varying quite wildly. The watchdog package that went out as Debian 8 was actually non-functional, as you have discovered. That wasn't picked up by pre-release testing.
The bug has been fixed for versi... | Problem with systemd starting watchdog |
1,450,248,929,000 |
I need use the watchdog, but I can't find any watchdog device. It means I need softdog? But I use modprobe softdog it still does not work. So I download the new Kernel 4.10.10. But I don't know how to find the sofedog modules. Just like this.
So where I can find the softdog modules?
|
The software watchdog option is now in Device Drivers->Watchdog Timer Support->Software watchdog
It can be a bit tedious to search for the location of certain options in the menuconfig but it actually took me less than a minute to find it.
| I can't find the /dev/watchdog |
1,450,248,929,000 |
So I've been configuring this Docker setup to run a simple service on Linux. The service uses the systemd watchdog and the sdnotify python library to ensure the service doesn't freeze. My problem is that the notify doesn't seem to get out of the docker VM to systemd and the watchdog always timeout. Here's my service:
... |
I have fixed it using sdnotify-proxy. I changed my starting command for this:
/usr/local/bin/sdnotify-proxy /run/my-sd.sock \
/usr/bin/docker run -t --name my-container --volume /run/my-sd.sock:/run/my-sd.sock \
--env NOTIFY_SOCKET=/run/my-sd.sock --privileged my
| Systemd Watchdog & Notify through Docker |
1,450,248,929,000 |
I am using an embedded linux environment. I have created a service which starts a qt application.
[Unit]
Description=AutoStart App
[Service]
Type=simple
ExecStartPre=/home/root/Clean_Application.sh
ExecStart=/home/root/Startup_Script.sh
WatchdogSecs=10min
NotifyAccess=all
Restart=always
StartLimitInterval=5min
StartL... |
So I was able to achieve the software watchdog.
By doing this.
#include <systemd/sd-daemon.h>
sd_notify(0,"READY=1"); //in my constructor
sd_notify(0,"WATCHDOG=1"); // in my timer every 10 seconds.
| Unable to reset systemd watchdog timer |
1,450,248,929,000 |
My machine sometimes does not properly reboot. I am not sure what triggers it to work or not work. It happens sometimes both during automatic reboots when unattended-upgrades tries to reboot as well as during manual reboot (sudo shutdown -r now).
It seems the machine will stop the services but not actually perform th... |
It looks like the watchdog is still running when the kernel tries to reboot, and the system still fails to reboot. That indicates a possible firmware/hardware issue: when the kernel stops running, the watchdog should eventually (typically within 10 minutes) force the system to reboot even if the kernel fails to trigge... | Reboot sometimes hangs [closed] |
1,450,248,929,000 |
I would like a method as described here to set a watchdog to keep a python script alive, but in archlinux.
Thanks
EDIT
Solved using the example provided by smokes2345. I created a python_script.service in /etc/systemd/system/ with the following content:
[Service]
Type=simple
ExecStart=/home/fernando/PycharmProjects/g... |
Create a systemd service unit as described here and be sure to include the line "Restart=always". Systemd is the Arch equivalent of upstart. A minimal configuration would look like:
[Service]
ExecStart=<full path to script>
Restart=always
You may need to invoke the interpreter directly and provide your script as an... | Watchdog for py script in archlinux |
1,450,248,929,000 |
We know that by opening /dev/watchdog the watchdog activates and by sending a character in less that a minute it will reset. the instructions are here.
The processor used for BBB AM335x enables its internal watchdog by default. But when the U-Boot or Ubuntu starts, this watchdog is disabled. and after OS is booted up ... |
After my investigations, I figured out that linux kernel does not disable the watchdog on boot, but it actually uses a timer to reset the watchdog. and when the kernel oops or panics it's still reseting the watchdog so the system won't restart by watchdog timer overflow.
Following this answer for this question from m... | Enable watchdog timer of BeagleBone Black which works even if os could not boot |
1,316,752,812,000 |
Possible Duplicate:
What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'?
I always see pts and tty when I use the who command but I never understand how they are different? Can somebody please explain me this?
|
A tty is a native terminal device, the backend is either hardware or kernel emulated.
A pty (pseudo terminal device) is a terminal device which is emulated by an other program (example: xterm, screen, or ssh are such programs). A pts is the slave part of a pty.
(More info can be found in man pty.)
Short summary:
A pty... | Difference between pts and tty |
1,316,752,812,000 |
I stumbled across a blog that mentioned the following command.
who mom likes
It appears to be equivalent to
who am i
The author warns to never enter the following into the command line (I suspect he is being facetious)
who mom hates
There is nothing documented about the mom command. What does it do?
|
Yes it's a joke, included in by the developers of the who command. See the man page for who.
excerpt
If FILE is not specified, use /var/run/utmp. /var/log/wtmp as FILE is common. If ARG1 ARG2 given, -m presumed: 'am i' or 'mom likes' are usual.
This U&L Q&A titled: What is a "non-option argument"? explains some o... | Is `who mom likes` a real linux command? |
1,316,752,812,000 |
Please help me to distinguish pts from gui mode generated from tty.
booting to multi-user.target
I did this:
sudo systemctl set-default multi-user.target
reboot
login with regular user debian8
ctrlaltf2 and login with regular user debian8 too.
run startx to switch into gui
run tty and who, which sai... |
Do as booting to graphical.target way.
ps -el |grep -v ?
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
4 S 0 683 1 0 80 0 - 4867 - tty1 00:00:00 agetty
4 S 0 901 686 1 80 0 - 63109 - tty7 00:00:10 Xorg
0 S 1000 2390 2388 0 80 0 - 7368 - ... | What is the difference between **pts** and **tty** and **:0**? |
1,316,752,812,000 |
The man page description of who command is
who - show who is logged on
But there exists a similar command whoami. The man page description of whoami is
whoami - print effective userid
Can anyone explain what exactly these commands do ? How are they different from each other ?
|
I am logging in as root in my shell and typing who and this is the output.
who
root tty1 2014-08-25 14:01 (:0)
root pts/0 2014-09-05 10:22 (:0.0)
root pts/3 2014-09-19 10:08 (xxx.xxx.edu)
It effectively shows all the users that have established a connection.
ssh ramesh@hostname
Runn... | Difference between who and whoami commands |
1,316,752,812,000 |
In command line platforms online, like for instance the one on Codecademy, when I run
for cmd in w who whoami id
do
echo $cmd
$cmd
echo =========================
echo " "
done
I get
w
00:52:54 up 8 days, 14:10, 0 users, load average: 3.78, 2.98, 2.69
U... |
id reports
the current credentials of its own process; or
the credentials of a named user, as read out of the system account database.
whoami reports the current credentials of its own process.
who and w report the active login sessions table from the login database.
BSD doco notes that whoami does a subset of th... | Different outputs for `w`, `who`, `whoami` and `id` |
1,316,752,812,000 |
In a RHEL 7.3 server, I was trying to find logged-in users. I ran w and it told me there were two users, but it only showed me the info of one (myself); then I ran who, which displayed the other user as (unknown). Finally, I ran lastlog, with which's output I could match the log in date and port from who's output and ... |
After reading Centimane's comment on /var/run/utmp and searching differently, I found this fedora forum thread, which mentioned the issue is provoked by a bug in GDM, which creates a bad entry in /var/run/utmp. Eventually I even found a bug report for it and another here.
| who shows (unknown) user logged-in: what's going on? |
1,316,752,812,000 |
I found the following in man who:
-T, -w, --mesg add user's message status as +, - or ?
--message same as -T
--writablesame as -T
So looked up info who and found
-w -T --mesg --message --writable After each login name print a character indicating the user's message status
+ allowing 'write' messages
- disallowing ... |
The -T and --message switch mean that who will display a +, -, or ? denoting whether the user is allowing messages to be written to their terminal.
`--writable'
After each login name print a character indicating the user's
message status:
`+' allowing `write' messages
`-' disallowing `wr... | 'who --message' -> which message? |
1,316,752,812,000 |
I want to show the online users using the who command but I want to have a unique output and not show any duplicates. I piped the output into awk but I am not very familiar with that, is this the right way and how to proceed?
|
It's easier to just do it with sort:
who | sort -u -k1,1
The -u flag asks for "unique" lines (suppress duplicates). The key flag (-k) says to only consider the first word in each line for purposes of sorting and uniqueness.
| Print unique of who command |
1,316,752,812,000 |
After a ssh connection, if I run the who command on the server : I have this response :
olivia@olivia-pc:~$ who
olivia :0 2014-09-08 11:40 (:0)
olivia pts/0 2014-09-08 11:43 (:0)
olivia pts/10 2014-09-08 13:54 (sim.local)
So it's easy to identify the incoming connection (third line).
If ... |
Not necessarily. Either line 2 or 3 is the terminal (eg xterm) that you are using to run the ssh command.
Because it's the terminal, not the ssh connection.
Complete coincidence. If you consider a Windows user connecting to the server using PuTTY, they will not have a local pts and neither will they have the who co... | Identify the outgoing connection (ssh) with the who command |
1,316,752,812,000 |
I made some modifications to the /home/user/.envfile so the PS1 prompt would show date/time as well as the pwd etc.
The modification is:
# `who am i` is used to obtain the name of the original user
case `who am i | awk '{print $1}'` in
'someuser')
#set the prompt to include the date and time
set -o... |
stty and older versions of who am i will issue error messages when they're not connected to a tty device. stty checks stdin (fd 0); I don't know what file descriptor who checks. To avoid getting those error messages, the usual workaround has been to use the -t option of test (more commonly known as [) to check if the ... | Is there a way to prevent a non-terminal-attached process from executing 'who' inside my .envfile? |
1,316,752,812,000 |
The logname utility became unusable a while ago for many users, since it relies on something that has been broken intentionally due to security concerns, as discussed here. As I read the discussion, it is unlikely that the functionality is going to come back.
I lived with workarounds for a while, but now I feel that ... |
TL,DR: you probably want /proc/PID/loginuid, even though its behavior doesn't always match logname. But it doesn't work out of the box on all distributions. Note that my answer assumes Linux, it does not apply to other Unix variants.
I don't think you'll find a fully satisfactory answer because you don't have clear ex... | A proper replacement for the `logname` utility? [closed] |
1,316,752,812,000 |
My observation:
If I open a new terminal (gnome/lx):
New /dev/pts/X is used
who does not lists these
First character of echo $0 is not -, so its not a login-shell.
If I ssh into the same machine with the same user
New /dev/pts/X is used
who lists these
First character of echo $0 is -, so its a login-shell.
If I o... |
First, who does not care about login shells, or anything such. It merely dumps utmp entries. You can have an entry for non-login terminals; for graphical sessions; for FTP connections (with a completely made-up tty "line" name); for just about anything.
Second, utmp entries are created manually – you only get an entry... | Is it necessary for a login-shell to create utmp entry? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.