Tag Info

Hot answers tagged

2

It looks like your shell is not being bash but plain sh. Super quick solution: just execute bash and see if that helps. For a better and permanent solution please check /etc/passwd and see what shell does the user have there. If you find /bin/sh change it for /bin/bash


1

The problem is indeed what @LuisAntolin pointed out. On Ubuntu systems, and most others, the default shell is /bin/sh. This is a symlink to /bin/dash on Debian-based systems. dash has no history command which is why you're getting that error. While you can indeed change this by editing /etc/password, a better way is to run chsh as the user ubuntu and set ...


1

I don't know what you mean by "next available" with respect to the $HOME and $SHELL variables. Those you just set to their defaults: /home/USERNAME and /bin/bash or whatever. For the $HOME, just make sure the directory does not exist ([ -e "/home/$username" ] && echo "Directory exists"). As for the groups, just list the available groups and take ...



Only top voted, non community-wiki answers of a minimum length are eligible