When I type in my console "runuser", I am getting "command not found". I though this command was pretty standard, but I cannot find it on my system.
I am on the root user but I do not have the password of the other user.
When I type in my console "runuser", I am getting "command not found". I though this command was pretty standard, but I cannot find it on my system.
I am on the root user but I do not have the password of the other user.
On Ubuntu you have su
and sudo
for this sort of thing:
su - username
Changes to user username
, as if that user had logged in.
sudo -u username command
Run a single command as user username
.
From your comment on the other answer:
When I do
su - otheruser
, I am gettingNo directory, logging in with HOME=/
. Then when I runwhoami
, I getroot
.
This happens because 'otheruser' hasn't got a shell (like bash). It's probably something like /bin/false. If you want a shell as 'otheruser', use this instead:
sudo -u otheruser /bin/bash