angelatwork wrote:Thank you kintrupf, for your swift reply

!
If I initially skip installing a new rom. Could you maybe point me to a web page? Where it explains how to only root the phone? I think I have only found web pages discussing rooting combined with different new rom.
I'm sorry, but I can't help you there specifically since I don't have a Galaxy s3 or s4 and thus don't know anything about rooting that phones. I used a toolkit named "Nexus Root Toolkit" to unlock my phones, but this toolkit works only for Nexus devices...
Those pages you've found should be a good starting point. You can normally just omit the installation of a custom ROM if you want to keep the original ROM, so any page that completely explains how to install a custom ROM onto a
locked phone must also have a complete description of rooting the phone.
If I recall correctly you usually need to:
1) unlock the bootloader (that's where all your user data is wiped)
2) install a custom recovery
3) root the phone
4) install a custom ROM (which is optional)