If you want to setup an account on your system that will be used only to transfer files (and not to ssh to the system), you should setup SFTP Chroot Jail.
This explains how: [WayBack] How to Setup Chroot SFTP in Linux (Allow Only SFTP, not SSH)
Posted by jpluimers on 2018/12/24
If you want to setup an account on your system that will be used only to transfer files (and not to ssh to the system), you should setup SFTP Chroot Jail.
This explains how: [WayBack] How to Setup Chroot SFTP in Linux (Allow Only SFTP, not SSH)
Posted in *nix, *nix-tools, Communications Development, Development, Internet protocol suite, Power User, SFTP, SSH, TCP | Leave a Comment »
Posted by jpluimers on 2018/12/24
[WayBack] Dieses sudo-Gehampel unter Debian/Ubuntu nervt. Aber es gibt Abhilfe: alias iddqd=’sudo su -‘ – Kristian Köhntopp – Google+
Or maybe this:
iddqd='sudo -i'
–jeroen
Posted in *nix, Linux, Power User | Leave a Comment »
Posted by jpluimers on 2018/12/24
From a while back, but still so cool! It allows you to “recover” the terminal (stdin/stdout/stderr) of a process that was attached to a terminal or ssh session.
Reptyr – Forgot to “screen” your ssh session first, and now that long running thing is stuck?
»
reptyr PIDwill grab the process with id PID and attach it to your current terminal.«server:~ # zypper install reptyr ... Retrieving: reptyr-0.3dev_git20120325-7.1.2.x86_64.rpm ...................[done] (1/1) Installing: reptyr-0.3dev_git20120325-7.1.2 ........................[done] server:~ # rpm -qi reptyr ... Summary : A tool for "re-ptying" programs Description : reptyr is a utility for taking an existing running program and attaching it to a new terminal. Started a long-running process over ssh, but have to leave and don't want to interrupt it? Just start a screen, use reptyr to grab it, and then kill the ssh session and head on home. Distribution: openSUSE 13.1
Source: [WayBack] Reptyr – Forgot to “screen” your ssh session first, and now that long running thing is stuck?… – Kristian Köhntopp – Google+
It works with tmux too and is supported on many Linux distributions, see for instance [WayBack] Reptyr – Move A Running Process From One Terminal To Another Without Closing It – OSTechNix.
You can even redirect a pty for gdb usage: [WayBack] reptyr(1): new terminal – Linux man page
StackExchange thread: [WayBack] How to recover a shell after a disconnection with these entries:
Originally from 2011 [WayBack] reptyr: Attach a running process to a new terminal – Made of Bugs it is still maintained:
GitHub repository [WayBack] nelhage/reptyr: Reparent a running program to a new terminal
–jeroen
Posted in *nix, *nix-tools, Linux, openSuSE, Power User, screen, SuSE Linux, tmux | Leave a Comment »
Posted by jpluimers on 2018/12/21
Be careful what you do: blindly following Super User can make sudo unavailable: [WayBack] linux – Keeping the fancy sudo warning forever – Super User.
Following the answer archived in the WayBack machine gets you into this situation:
sudo -i
>>> /etc/sudoers.d/privacy: syntax error near line 1 <<<
sudo: parse error in /etc/sudoers.d/privacy near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
The cause:
I forgot to put a line terminator at the end of the line in the privacy file.
If you do that, then it works fine: add this line INCLUDING A LINE TERMINATOR to /etc/sudoers.d/privacy (any file in that directory will do):
Default lecture=always
The first time I do
sudoon openSUSE I’m always warned with a someway fancy messageWe trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. root's password:After the first successful login I won’t be warned again.
I’d like to be always warned. I find this message someway fancy. Is there any way to be warned like that by sudo prompt?
Happily, however, my
man sudoersadmits of the stringlecture_filewhich it says is the[p]ath to a file containing an alternate sudo lecture that will be used in place of the standard lecture if the named file exists. By default, sudo uses a built-in lecture.
So see if your sudo supports that, and if it does, set it to a particular filename with e.g.
Defaults lecture_file = /etc/sudoers.lectureand put your lecture text in that file. You may find this easier to test, as I did, if you also do
Defaults lecture = alwayswhich will display the lecture on every invocation of sudo. Otherwise you may run out of accounts which have never sudo’ed while you get this right!
–jeroen
Posted in *nix, *nix-tools, Power User | Leave a Comment »
Posted by jpluimers on 2018/12/17
One day I will need to enable repeating those messages: [WayBack] linux – Is there a way to remove “Last message repeated x times” from logs? – Server Fault
–jeroen
Posted in *nix, *nix-tools, Linux, Power User | Leave a Comment »
Posted by jpluimers on 2018/12/14
For a keyboard-less Raspberry Pi machine that functions as a read-only screen, I needed:
I already had the E20 ([WayBack] Enlightenment) X11 server running as that’s the first image on [WayBack] HCL:Raspberry Pi3 – openSUSE that as a graphical UI that works.
Posted in *nix, *nix-tools, Power User, Screen sharing, VNC/Virtual_Network_Computing, X11, X11vnc | Leave a Comment »
Posted by jpluimers on 2018/12/13
For my link archive:
Non-stable repos:
–jeroen
Posted in *nix, Linux, Monitoring, Nagios, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »
Posted by jpluimers on 2018/12/12
Having mainly used ssh as a means to connect to a shell on remote machines and occasionally a manual port forward.
I never noticed autossh where you can automate the ssh logon process to keep permanent port forwards up and running. Cool!
It’s on my research list now, as this will be useful probably sooner than later:
My initial impression is that autossh is a wrapper around the regular ssh client that allows reconnection upon communication failures.
–jeroen
Posted in *nix, *nix-tools, Communications Development, Development, Internet protocol suite, Power User, SSH, TCP | Leave a Comment »
Posted by jpluimers on 2018/12/07
If adding a Windows machine to a Samba domain fails and the below “solves” your issue, then you need to tighten the security on the Samba side:
- [WayBack] Old Nabble – Samba – General – Windows 7 RC
- [WayBack] Windows 7 can see Samba Shares but cannot see Samba Domain
- [WayBack] Adding a Windows 8.1 computer to a SAMBA domain – twm’s blog
- [WayBack] Note to self: If adding a Windows 8.1 computer to a SAMBA domain fails with the error “The specified domain either does not exist or could not be contac… – Thomas Mueller (dummzeuch) – Google+
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Parameters] ; Enable NT-Domain compatibility mode ; Default: ; [value not present] ; "DomainCompatibilityMode"=- "DomainCompatibilityMode"=dword:00000001 ; Disable required DNS name resolution ; Default: ; [value not present] ; "DNSNameResolutionRequired"=- "DNSNameResolutionRequired"=dword:00000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Netlogon\Parameters] ; Disable requirement of signed communication ; My Samba (3.0.33) works with signed communication enabled, so no need to disable it. ; Default: ; "RequireSignOrSeal"=dword:00000001 ; Disable the usage of strong keys ; Default: ; "RequireStrongKey"=dword:00000001 "RequireStrongKey"=dword:00000000
–jeroen
Posted in *nix, *nix-tools, Power User, samba SMB/CIFS/NMB, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows 9 | Leave a Comment »
Posted by jpluimers on 2018/12/06
An interesting idea at [WayBack] I was getting concerned about a backup, which had exceeded 1GB, when the data was only about 400MB. Once the job finished, I realized: Ahh, ZFS compres… – Dan Langille – Google+:
Here’s that script I use for creating/destroy the snaphots for a particular long dataset name. Then I backup from /mnt
[WayBack] gist.github.com/dlangille/480dbca509562eb03e76c2e1b576c6d2 is in sh, not even bash.
–jeroen
Posted in Development, Power User, Scripting, sh, ZFS | Leave a Comment »