different shell for root and non-root user
Solution 1
Please see man usermod
.
An example would be sudo usermod -s /bin/bash username
.
Solution 2
As far as I know your default shell is defined in /etc/passwd
(as decided at user creation). Change /etc/passwd
on the target machine to reflect your choice.
Solution 3
The command chsh(1)
is used to change a user's shell. The system can be set up to allow only certain shells by listing the allowed shells in /etc/shells
. This does not need root privileges, but a user can only change their shell.
You will need to enter your password (not root) to change your shell, unless you are root, in which case no password is needed and you can set any program to be used as a user's shell (ignoring /etc/shells
).
Solution 4
You can do this either while creating the user with the option useradd -s /bin/bash
, or later with usermod -s /bin/bash
as suggested by can, or by modifying the /etc/passwd
file as suggested by asoundmove. But if you are looking for another solution, then I suggest looking for the file /etc/default/useradd
and modifying it according to your need. If you change the line SHELL=/bin/bash
, it will apply to every new user. Also have a look at /etc/login.defs
file.
Related videos on Youtube
Bachalo
Updated on September 18, 2022Comments
-
Bachalo over 1 year
Can any AMFPHP experts tell me if it's possible to upload a file I select from my local HD using
FileReference
to an AMFPHP method?I must target FP9, though I know FP10 has a
FileReference.data
method. -
m33lky about 13 yearsOMG thanks. I used useradd, so that's why it was configured to
sh
. If you use adduser, it will bebash
on Ubuntu. -
Keith about 13 years@fortress You can use the
-s
option to set the shell at user creation time.