I'm spinning up a bunch of identical servers but I don't have my ops deployment set up yet. Well, I already made a mistake in initializing the first server, namely, useradd steam
not adduser steam
.
I tried to repair the user using mkhomedir_helper steam
, as well as switching the user directory to /home/steam1 and back to /home/steam. I didn't make the mistake on my second server, and that one has colors on it.
I've tried to copy the .bashrc
from both the root account and the /etc/skel
rm /home/steam/.bashrc;sudo cp /root/.bashrc /home/steam/.bashrc
rm /home/steam/.bashrc rm /home/steam/.profile /home/steam/.bash_logout;sudo cp /etc/skel/.* /home/steam
After each of these commands, I disconnected and reconnected to my box, but I still had no colors. I also tried to set force_color_prompt=yes
, but that did not fix the colors issue either.
Any ideas on how I can fix this user account to have colors? Any new user I create on the box and root also have colors.
useradd
sets the login shell to/bin/sh
rather than/bin/bash
so it's not reading~/.bashrc
at all? Check the value ofSHELL
in/etc/default/useradd
– steeldriver Jul 21 '18 at 21:44cat /etc/passwd/
and it's set tosteam:x:1000:1000:steam,,,:/home/steam:/bin/bash
in both. – PatPeter Jul 21 '18 at 21:46SHELL
is definitely/bin/sh
and I had to change it fromsh
tobash
after user creation. – PatPeter Jul 21 '18 at 21:47.bashrc
, or the.profile
as well? the latter will be the one that affects login shells (and in fact sources.bashrc
by default). In fact if you want to do whatadduser
does, then copy ALL the files from/etc/skel
– steeldriver Jul 21 '18 at 22:11.bashrc
, but I updated my question with my attempt at copying.profile
and.bash_logout
as well. – PatPeter Jul 21 '18 at 22:40.bash_profile
file :P – PatPeter Sep 03 '18 at 17:29