I only know the UID of a user, is it possible to switch user using UID in linux distribution like we do using username like su -u someuser
?
How to Switch User Given a UID in Linux
linuxsusudouser-accounts
linuxsusudouser-accounts
I only know the UID of a user, is it possible to switch user using UID in linux distribution like we do using username like su -u someuser
?
Best Answer
Look up the username with the
id
command, e.g.:Then put it together with command substitution: