Hi the_tox, can you outline what you did to get the sonic user working correctly? I have tried on and off and always get the same result: no sonic user, but the $ symbol.
It actually does not matter if you see the
$ symbol, or the
sonic user in the command prompt.
This misunderstanding already spawned a separate thread (
http://forums.freenas.org/threads/creating-users-within-jails-in-shell-buggy.15830/) and an (already closed) bug report (
https://bugs.freenas.org/issues/3343), so let me explain the "mystery" :).
The string you see at the begging of the command line depends on the shell you use and is also fully customizable. If you selected the
sh shell when creating the user (
adduser asks you this question: "
Shell (sh csh tcsh nologin) [sh]:") you will only get the
$ prompt. If you selected the
csh shell you will get the "nicer" prompt. You see the prompts because those are the defaults for the respective shells. However, both shells allow you to customize the prompt. The
sh shell by changing the
PS1 environmental variable. Let me quote from the
sh manual (
http://www.freebsd.org/cgi/man.cgi?manpath=freebsd-release-ports&query=sh):
[PANEL]
PS1 The primary prompt string, which defaults to ``$ '', unless you
are the superuser, in which case it defaults to ``# ''.[/PANEL]
In
csh it's the
prompt environmental variable (
www.freebsd.org/cgi/man.cgi?manpath=freebsd-release-ports&query=csh):
[PANEL]
prompt The string which is printed before reading each command from
the terminal.
prompt may include any of the following format-
ting sequences (+), which are replaced by the given informa-
tion:
<snip>[/PANEL]
The default for
csh is "
%n@%m:%/ %#" (you can check the documentation for explanation of all the special codes, but
%n is automatically replaced by the
username and
%m by the
hostname).
So, it really does not matter what prompt you see. To find out which user credentials you are using run this command:
[PANEL]
whoami[/PANEL]
The
whoami (Who am I?) command will print the current user name (
http://www.freebsd.org/cgi/man.cgi?manpath=freebsd-release-ports&query=whoami) and I'm pretty sure that it will display
sonic even if you see the
$ prompt.
PS: You can see this shell difference already when you
jexec into the jail. If you run
jexec 1 /bin/sh you will only get
# (it's
# and not
$, because you are root), if you run
jexec 1 /bin/csh you will see
root@[hostname]:/ #.