All posts by Bruce

vim replace with newline

Just a quick vi/vim tip that I’d never had to do before now.

Scenario: a file with multiple lines, each terminated with a semicolon, that needed to be broken out into separate lines for easier reading.


In vim, use \r in the search-and-replace command to indicate a new line:


Email forwarding to multiple recipients with cPanel

At first I thought I’d have to do something complicated like an email list. But I found out that you just have to create multiple single forwarder entries with the same “Address to forward” for each, and the different recipients in each “Forward to email address” field per entry.

Example: -> ->

sudo and local passwords vs SSH

Just tracked down a problem with sudo at work. The error message

sudo: pam_authenticate: Module is unknown

would show up when doing “sudo su -”

An initial strace shows that libkeyutils was being looked for:

open("/lib64/tls/x86_64/", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/x86_64", 0x7fffe8902810) = -1 ENOENT (No such file or directory)
open("/lib64/tls/", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/tls", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/lib64/x86_64/", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/x86_64", 0x7fffe8902810)   = -1 ENOENT (No such file or directory)

but was not installed on the server. A “correct” server shows:

[root@host ~]# rpm -qa | grep keyutils|sort

Without keyutils installed, the SSH keys we had set up weren’t able to be processed. PAM then fell back to local passwords, which was not set for the particular user in question.

Anyway, just hoping this helps someone else in the future.