A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Jump to

Quick reference

Showing posts with label admin. Show all posts
Showing posts with label admin. Show all posts

Ubuntu Linux setup basics

For username "foo":

$ adduser foo

$ passwd foo

$ sudo usermod -aG sudo foo

$ mkdir -p /home/foo/.ssh

$ cat the_public_key.pem >> /home/foo/.ssh/authorized_keys

$ chown -R foo:foo /home/foo/.ssh

$ chmod 700 /home/foo/.ssh

$ chmod 600 /home/foo/.ssh/authorized_keys
Disable default account:
$ usermod -s /usr/sbin/nologin default_username

Notes:
  • Not useradd.
  • Even when logging in with just SSH key, user must have a password. It will only be used for sudo commands.

Sudoers basics

Batch deleting files in Windows

List all the jpg files:

dir /s *.jpg /b > jpgs.txt

Delete all the jpg files:

del /s /q /f /a *.jpg



Mac top

On a Mac, sort top output by %CPU, descending:

top -o -cpu

Jenkins admin notes

Some things to help on your Continuous Integration journey with Jenkins:

  • Use  docker pull jenkins  for a quick start
  • Security can be a bit fiddly to set up. Try these easy settings:
    • Jenkins’ own user database
    • Allow users to sign up
    • Logged-in users can do anything
  • There is a Role-Based Strategy plugin for more advanced use
  • If you accidentally lock yourself out, edit  $JENKINS_HOME/config.xml  to say false and restart Jenkins
  • To see a list of failing tests, configure a Post-build action for  "Publish JUnit test result report"

-- Jenkins ver. 1.642.2

Common admin tasks in phpBB 3

Change the author of a post:

  • Click on the post
  • Click on the "Moderator Control Panel" link in the top left
  • Click on the "Post details" link on the right-hand side (note: It might look like a triangle with a question mark in it)
  • Scroll down to the bottom of the post, and you will see a drop-down menu to change the poster.