INT 21h

Hi, I am Vladimir Smagin, SysAdmin, DevOps and barely good guy. Telegram Email / GIT / Микроблог / Thingiverse / GPG

FreeLAN Ansible Playbook

№ 9746 В разделе "Sysadmin" от February 20th, 2019,
В подшивках: , ,

Playbook for fast FreeLAN VPN network deployment with following network map:

Нет комментариев »

gogocron – one second cron daemon

№ 9641 В разделе "Sysadmin" от December 12th, 2018,
В подшивках: , ,

After unsuccessful searches of same featured cron daemon I wrote it myself.


  • 1 second minimal interval
  • 10 ms precision
  • run command as other user
  • batch of commands
  • timeout for whole task
  • your own ENV variables
  • traditional crontab syntax

Нет комментариев »

NTFS and Linux: The disk contains an unclean file system

№ 9450 В разделе "Sysadmin" от October 6th, 2018,
В подшивках:

Rebooted from Windows to Linux normally, but…

vlad@turtle:~$ sudo mount /media/Sklad 
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)

  1. sudo umount /dev/sdc1
  2. sudo ntfsfix /dev/sdc1
  3. sudo mount /dev/sdc1

That’s all folks! Never run Windows again.

Нет комментариев »

Ansible: switch SSHd to use public key auth only, block password auth

№ 9447 В разделе "Sysadmin" от September 28th, 2018,
В подшивках: , ,

This task regexps sshd_config for specific option and sets value to yes. If option not found it will be added to the end of file.

Options you want to change:

      PubkeyAuthentication: "yes"
      PasswordAuthentication: "no" 

Now remove from config all options you want to change:

- name: Remove all marked options from config
  become: yes
    path: "{{ sshd_config_path }}"
    state: absent
    regexp: '{{ item.key }}'
  with_dict: "{{ sshd_options }}"
  when: sshd_options != None and sshd_options is defined

Nice, now add your options to sshd config:

- name: Add marked options to config
  become: yes
    path: "{{ sshd_config_path }}"
    state: present
    line: '{{ item.key }} {{ item.value }}'
  with_dict: "{{ sshd_options }}"
  when: sshd_options != None and sshd_options is defined

If you want replace string option:

- name: Set PubkeyAuthentication = yes
  become: yes
    path: /etc/ssh/sshd_config
    regexp: '^PubkeyAuthentication no'
    line: 'PubkeyAuthentication yes'

Full sample here

Нет комментариев »

Convert PPK to PEM without putty-tools

№ 9407 В разделе "Sysadmin" от September 12th, 2018,
В подшивках: ,

Public ppk key to openssh and out to authorized_keys file

ssh-keygen -i -f sergey.ppk >> ~/.ssh/authorized_keys

Нет комментариев »

Микроблог перейти

# 2019-12-23 09:14:01

Очень интересная концепция, docker-compose для kubernetes #devops #kubernetes #docker

# 2019-12-16 17:21:18

Надо будет почитать для общего развития как оживить кластер в случае проеба сертов #kubernetes #devops

# 2019-12-12 17:33:46

js bootstrap с интерфейсом как в DOS

© Vladimir Smagin, 2005-2019. Копирование материалов без разрешения запрещено. GPG DA4CD0F5E222EA727D6A40C413BCE12E5618F071 *

Fortune cookie: Hear about... the recent cigarette survey that disclosed that 99% of the men who have tried Camels have gone back to women?