anvd anvd - 5 months ago 13
Linux Question

CLI limited when doing login with a user created

In my VPS, I don't know why, but when I do a

su
to another user what I get is:

root@deb64:~# su john
$


The autocomplete with tab doesn't work, and even the command source. Example:

root@deb64:/home/john/myproject# source venv/bin/activate
(venv) root@deb64:/home/john/myproject#





root@deb64:/home/john/myproject# su john
$ cd /home/john/myproject
$ source venv/bin/activate
sh: 2: source: not found
$


What is happening with the command line?

Answer

You switching into a shell which does not have tab-completion (sh for instance). You can start bash or similar like this: exec bash. You can edit /etc/passwd if you wish to make this permanent.