Category: UNIX
-
how to test ports – Telnet, Expect, Bash, Netcat, Nmap
For “security reasons” telnet and nmap are not included in the basic set of utilities present on a production server. And why would you install software, that you usually don’t need there? But occasionally these tools are needed and should be available for installation. I certainly like telnet and nmap for the described purposes.
-
getent is a Unix command that helps a user get entries in a number of important text files called databases
The databases it searches in are: ahosts, ahostsv4, ahostsv6, aliases, ethers (Ethernet addresses), group, gshadow, hosts, netgroup, networks, passwd, protocols, rpc, services, and shadow.
-
Unix, Linux: how to do a proper and secure file transfer in a cronjob
I got advised to do sftp with an empty passphrase. I got that working. Was pretty straight forward. But is there a better way? With a non-empty passphrase? But how to deal with that passphrase? https://en.wikipedia.org/wiki/ssh-agent https://linuxhandbook.com/transfer-files-ssh/ https://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ my buzzword web search: ssh file transfer best practice I do my ordinary SSH handling with an…
-
“System Security Services Daemon” AKA SSSD
… It is intended to provide single sign-on capabilities to networks based on Unix-like OSs that are similar in effect to the capabilities provided by Microsoft Active Directory Domain Services to Microsoft Windows networks. https://en.wikipedia.org/wiki/System_Security_Services_Daemon Enroll your Linux machine into an Active Directory, FreeIPA or LDAP domain. Use remote identities, policies and various authentication and…
-
Linux: how to edit certain system files in a secured way: vipw, vigr, visudo
https://manpages.debian.org/unstable/passwd/vipw.8.en.html https://manpages.debian.org/unstable/passwd/vigr.8.en.html https://manpages.debian.org/unstable/sudo/visudo.8.en.html vipw and vigr are actually the same utility. You still have to also apply sudo on your command in order to gain the necessary privileges: Under certain circumstances you have to tell the utility, which (visual) editor to use: CAVEAT: the following article tells you something incorrect regarding “-s” / “–shadow” (read…
-
Linux: how to grant “sudo” privileges to an account: “usermod”
https://manpages.debian.org/unstable/passwd/usermod.8.en.html CAVEAT: Do not edit any file for gaining the required effect, instead: use the following command line! Actually it adds (“–append”) ACCOUNT to a user group by the name of sudo. That works because of this entry in the file /etc/sudoers (what is the group sudo allowed to do?): In other Linux distributions the group…
-
Unix 7th Edition Manuals in PDF – where to get them
http://plan9.bell-labs.com/7thEdMan/bswv7.html these documents contain the manual pages (in original layout) describing the Bourne Shell, awk etc
-
GNU find – search for files in a directory hierarchy
https://manpages.debian.org/unstable/findutils/find.1.en.html print each file’s last modification time (%T+) and its name (%P): $ find . -type f -printf ‘%T+ %P\n’ Because the time stamp is printed first and also in a suitable way, this is what we use to sort the files within a directory by their last modification time.
-
terminal emulators available in the Cygwin environment
The classical Unix/BSD/Linux approaches: https://en.wikipedia.org/wiki/Terminal_multiplexer https://en.wikipedia.org/wiki/GNU_Screen https://en.wikipedia.org/wiki/Tmux … I urgently need to replace mintty within my Cygwin environment by something more serious. I need to split the screen horizontally or vertically. And I cannot cope with screen‘s shortcomings – esp. with its learning curve. https://cygwin.com/packages/package_list.html https://cygwin.com/packages/x86_64/konsole/ https://cygwin.com/packages/x86_64/konsole4/ Which packages can we find in Cygwin: $…
-
“watch” runs some command repeatedly, displaying …
https://manpages.debian.org/unstable/procps/watch.1.en.html “watch” is nice, but sometimes I like this better: $ while sleep 2; do echo -n “$(date ‘+%F %T : ‘)”; …; done