Hi, when I use useradd of adduser in CentOS 3 or 4, the default shell a user gets /bin/bash. I want this to be changed to /bin/false for security reasons... How can I accomplish this?
Thanks in advance for any help.
Am Mo, den 21.02.2005 schrieb Michiel van Es um 15:46:
when I use useradd of adduser in CentOS 3 or 4, the default shell a user gets /bin/bash. I want this to be changed to /bin/false for security reasons... How can I accomplish this?
useradd --help --> -s Shell
So just use that parameter like "-s /bin/false".
Alexander
On Mon, 21 Feb 2005 15:56:27 +0100, Alexander Dalloz ad+lists@uni-x.org wrote:
Am Mo, den 21.02.2005 schrieb Michiel van Es um 15:46:
when I use useradd of adduser in CentOS 3 or 4, the default shell a user gets /bin/bash. I want this to be changed to /bin/false for security reasons... How can I accomplish this?
useradd --help --> -s Shell
So just use that parameter like "-s /bin/false".
Alexander
I think what he means to do is not add that parameter each time he uses `useradd'
I believe the file you want to look for is /etc/default/useradd or somesuch.
Thanks!
-Wes
Wes Wannemacher wrote:
On Mon, 21 Feb 2005 15:56:27 +0100, Alexander Dalloz ad+lists@uni-x.org wrote:
Am Mo, den 21.02.2005 schrieb Michiel van Es um 15:46:
when I use useradd of adduser in CentOS 3 or 4, the default shell a user gets /bin/bash. I want this to be changed to /bin/false for security reasons... How can I accomplish this?
useradd --help --> -s Shell
So just use that parameter like "-s /bin/false".
Alexander
I think what he means to do is not add that parameter each time he uses `useradd'
I believe the file you want to look for is /etc/default/useradd or somesuch.
Thanks!
-Wes _______________________________________________
Jup..that's it! :) Thanks!
Michiel
Alexander Dalloz wrote:
Am Mo, den 21.02.2005 schrieb Michiel van Es um 15:46:
when I use useradd of adduser in CentOS 3 or 4, the default shell a user gets /bin/bash. I want this to be changed to /bin/false for security reasons... How can I accomplish this?
useradd --help --> -s Shell
So just use that parameter like "-s /bin/false".
Alexander
Alexander,
Haven't seen you around in a long time. What's the haps man?
Here's a side question in relation to the shell. Which convention is more correct, or does it even matter. /bin/false or /bin/nologin?
Am Mo, den 21.02.2005 schrieb Alex White um 16:08:
Hi Alex!
Haven't seen you around in a long time. What's the haps man?
A bit busy in the last weeks - and did post enough in the last year on the Fedora list ;)
Here's a side question in relation to the shell. Which convention is more correct, or does it even matter. /bin/false or /bin/nologin?
With the /sbin/nologin shell you get a feedback that the account login is disabled. /bin/false is just silent. What you use depends on specific target. For login-less FTP user account for example I prefer /bin/false.
Alexander
/etc/default/useradd
On Mon, 2005-02-21 at 08:46, Michiel van Es wrote:
Hi, when I use useradd of adduser in CentOS 3 or 4, the default shell a user gets /bin/bash. I want this to be changed to /bin/false for security reasons... How can I accomplish this?
Thanks in advance for any help.
adduser -s /bin/false loginname
if the user is already created... you can use chsh to change their shell. ie: chsh -s /bin/false loginname
Refer to useradd(8) manual page.
On Mon, 21 Feb 2005 15:46:53 +0100, Michiel van Es michiele@info.nl wrote:
Hi, when I use useradd of adduser in CentOS 3 or 4, the default shell a user gets /bin/bash. I want this to be changed to /bin/false for security reasons... How can I accomplish this?
Thanks in advance for any help.
Michiel _______________________________________________ CentOS mailing list CentOS@caosity.org http://lists.caosity.org/mailman/listinfo/centos
On Mon, Feb 21, 2005 at 03:46:53PM +0100, Michiel van Es wrote:
Hi, when I use useradd of adduser in CentOS 3 or 4, the default shell a user gets /bin/bash. I want this to be changed to /bin/false for security reasons... How can I accomplish this?
USERADD(8) useradd ... [-s shell]
Cheers,
Tru