i just run bash and get bashWhat happens when you run/usr/local/bin/bash
from your /bin/sh prompt?
$ su
Password:
[root@FreeBSD /usr/home/userx]# chsh -s /usr/local/bin/bash userx
chsh: user information updated
[root@FreeBSD /usr/home/userx]# exit
exit
$ echo $SHELL
/bin/sh
$ bash
------------------------------------------------------------------
FreeBSD.org
Kernel 12.1-RELEASE
Uptime 12:54PM up 1:35, 2 users, load averages: 0.90, 0.40, 0.39
HP EliteBook 840 G2
CPU: Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz (2294.74-MHz K8-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
------------------------------------------------------------------
userx@FreeBSD.org:/usr/home/userx
$ echo $SHELL
/bin/sh
from that one, I was just giving you the output. and yes I tried logging out and in a few times. that is why i posted. There was no reason to do it just to post back ..From the output above you never logged out and back in again. You just exited the su'd root session.
chsh
attempts at changing your shell, if my memory serves me well, the only reason for a failure is if two concurrent sessions are modifying the very same user.luca@miguel ~ % echo $SHELL
/usr/local/bin/zsh
luca@miguel ~ % bash
[luca@miguel ~]$ echo $SHELL
/usr/local/bin/zsh
[luca@miguel ~]$ which bash
/usr/local/bin/bash
[luca@miguel ~]$ chsh -s /usr/local/bin/bash
Password:
chsh: user information updated
[luca@miguel ~]$ echo $SHELL
/usr/local/bin/zsh
chsh
laying around and overriding or preventing changes:% ssh luca@192.168.222.66
luca@test:~ % uname -a
FreeBSD test 12.1-RELEASE FreeBSD 12.1-RELEASE r354233 GENERIC amd64
luca@test:~ % chsh -s /usr/local/bin/bash
Password:
chsh: user information updated
luca@test:~ % uptime
9:00AM up 4 mins, 2 users, load averages: 0.90, 0.49, 0.22
luca@test:~ % logout
Connection to 192.168.222.66 closed.
% ssh luca@192.168.222.66
[luca@test ~]$ echo $SHELL
/usr/local/bin/bash
[luca@test ~]$ uptime
9:00AM up 4 mins, 2 users, load averages: 0.93, 0.52, 0.24
[luca@test ~]$
/usr/local/bin/bash
get appended at the end of /etc/shells? When that line is there, doesn't chsh
read from that file to change shells for the user?The /etc/shells file is simply a list of shells a user is allowed to pick from.When you install bash in FreeBSD, doesn't the line /usr/local/bin/bash get appended at the end of /etc/shells? When that line is there, doesn't chsh read from that file to change shells for the user?