You can try this tho: https://hacknpentest.com/linux-privilege-escalation-via-writeable-etc-passwd-file/