Skip to content

Sign a PDF on Linux with SuisseID

Sign a PDF on Linux with SuisseID published on

Assumed, your SuisseID Smartcard already is working on your Linux workstation.

  1. Download LocalSigner from Open eGov Plattform of Confoederatio Helvetica
  2. Untar it to ~/opt or wherever you want
    tar xvzf localsigner_4.1.3_linux.tar.gz --directory=~/opt
  3. Make sure you use Java 8 (Oracle or OpenJDK). I had some issues with openJDK 10
  4. run localsigner
    ~/opt/LocalSigner/local-signer.sh
  5. If the PDF is not PDF/A, then a "convert" button is shown, hit it
  6. the rest is self-explanatory, select a source and a destination, then click on "sign" on the bottom-right
  7. to check the signature, there is a command line tool. Run:
    pdfsig ~/path/signed-file.pdf

Debian: Customizing steps after minimal installation

Debian: Customizing steps after minimal installation published on

Install vim:

apt install -y vim

customize ~/.vimrc for root und administrator (or main user). To paste via PuTTY into a ViM window, you have to add set mouse-=a first.

syntax on
set laststatus=2
set nobackup
colorscheme elflord
set hlsearch
set mouse-=a
"auto jump to the line where closed
if has("autocmd")
  au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
    \| exe "normal! g'\"" | endif
endif

~/.bashrc (root)

PS1='\[\e[1;31m\]\u@\h:\[\e[0;33m\]\w\$\[\e[0;37m\] '
export LC_COLLATE="C"
export LS_OPTIONS='--color=auto --group-directories-first'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
alias grep='grep --color'

Administrator .bashrc, uncomment:

force_color_prompt=yes

Add at the end at " some more ls aliases"

export LC_COLLATE="C"
export LS_OPTIONS='--color=auto --group-directories-first'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS' 
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'

Install/configure some stuff

apt install -y zip bash-completion
dpkg-reconfigure keyboard-configuration

Enable bash-completion /etc/bash.bashrc (uncomment)

# enable bash completion in interactive shells
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

rsync through SSH

rsync through SSH published on

If you want to RSYNC through SSH and there are probably a lot of data, then use following steps:

Install screen, so you can exit your SSH session during rsyncing.

Open scren:

screen

Start a rsync from remote to your local dir:

rsync -av -e ssh username@ipadressordns:/remote/his/folder /home/my/folder/ > rsync.log 2>&1

after you started this, use CTRL+Z and with the command bg you make sure, the command is running in the background.
now you can use tail, to stalk the progress of the sync

tail -f rsync.log


If you have a different SSH port use this

rsync -av -e "ssh -p 2121" username@ipadressordns:/remote/his/folder /home/my/folder/

you can leave the screen with CTRL+A then D and you can exit the SSH connection and go having a beer.
The next day you can look at your syncing with:


#resume screen from day before
screen -r

#put sync command in foreground (if it is still running)
fg

#check sync file
vim rsync.log

#start another sync like above, to make sure, everything was synced correctly

helpful: http://troy.jdmz.net/rsync/index.html

Re-Add a Computer to a Windows Domain

Re-Add a Computer to a Windows Domain published on

If you e.g. restored a full backup of a client and you could get a similar error to this below:

Then you have to readd the server or computer to a domain with this:

  1. log in as Administrator
  2. Open Powsershell as admin and run this
    Reset-ComputerMachinePassword -Server domaincontroller.example.com -Credential domainadmin@example.com