install yubikey with success

I tried to install yubikey on tumbleweed following and adapting the procedure from the yubikey-site with fedora-procedure. So what did I do?
Since my yubikey was just configured, I only had to do this:

  1. direct install of pam_yubiko from https://software.opensuse.org/package/pam_yubico?search_term=pam_yubico
  2. Create a yubikeys file in etc with the following text:
root:XXXXXXXXXXXX
your username:XXXXXXXXXXXX

where XXXXXXXXXX is the unique string of the twelve first letters of your yubikey otp code
3) for login with yubikey only i added the following line in the beginning of the file /etc/pam.d/gmd:

auth sufficient pam_yubico.so id=1 authfile=/etc/yubikeys
  1. for su i added the same line in the beginning of /etc/pam.d/su
  2. for sudo I added the same line in the beginning of /etc/pam.d/sudo

After on login, on sudo or on su i only have to press the yubikey and need no password anymore
If you want yubikey and password you have to change the line

auth sufficient pam_yubico.so id=1 authfile=/etc/yubikeys

into

auth required pam_yubico.so id=1 authfile=/etc/yubikeys

When you have trouble, you can start with a live cd and rechange the files above.