Fix changing the user shell on FreeBSD
Merge pull request #4358 from herself/hf-test

Fix changing the user shell on FreeBSD