Re: [SLUG] creating new users with no shell as a default

2005-07-28 Thread tatz
Hi,

From: John Clarke <[EMAIL PROTECTED]>
Date: Fri, 29 Jul 2005 09:57:52 +1000

> > how do I set the 'no shell' part as a defualt for future users ?
> 
> Edit /etc/default/useradd.

Generally, these kind of information can be obtained by man pages.
So, if you have a question about useradd command, type
  man useradd
at command line. Then, you are noticed that file name.

Cheers,
-- 
SEKINE Tatsuo:
 [EMAIL PROTECTED]System Design & Research Inst. Co.,Ltd.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] creating new users with no shell as a default

2005-07-28 Thread John Clarke
On Fri, Jul 29, 2005 at 10:53:34 +1000, Voytek wrote:

> SHELL=/bin/bash

That's what you want to change.

> can I edit /etc/passwd directly ? to alter home path ? shell ?

Yes (with vipw), but don't.  Use usermod instead.


Cheers,

John
-- 
This  is a.s.r; you  want n.a.n.a.e.,  where there  is a  _LONG_ queue
waiting to do Something Horrible to Telstra. It's slightly longer than
the  number of  people who  have ever  participated in  [EMAIL PROTECTED], and
growing at about the same rate. -- Mike Andrews
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] creating new users with no shell as a default

2005-07-28 Thread Voytek
thanks, John


> On Fri, Jul 29, 2005 at 09:42:50 +1000, Voytek wrote:

> I'd use /sbin/nologin instead, but whatever you use, make sure it's
> listed in /etc/shells.

I have these in /etc/shells:

/bin/sh
/bin/bash
/sbin/nologin
/bin/bash2
/bin/ash
/bin/bsh
/bin/tcsh
/bin/csh
/bin/false

looking at /etc/passwd, it seems all current 'web' users have
'/bin/false', and, some 'service users' (like clam) have '/sbin/nologin'

>> how do I set the 'no shell' part as a defualt for future users ?
>
> Edit /etc/default/useradd.

currently have this:
# useradd defaults file
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel


>> how can I verify the 'no shell' is set (apart from trying to ssh login
>> (as
>>
>
> Look in /etc/passwd.  The last field on each line is the shell, e.g.:
>
>
> johnc:x:500:500:John Clarke:/home/johnc:/bin/bash

can I edit /etc/passwd directly ? to alter home path ? shell ?

thanks again
-- 
Voytek

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] creating new users with no shell as a default

2005-07-28 Thread John Clarke
On Fri, Jul 29, 2005 at 09:42:50 +1000, Voytek wrote:

> all the users on my RH server (apart from me) are web/mail users, that is,
> they only need ftp access, no ssh, no shell
> 
> is this the correct way to create them (the /bin/false part):
> 
> adduser domain.com.au -s /bin/false -p passwd

I'd use /sbin/nologin instead, but whatever you use, make sure it's
listed in /etc/shells.

> how do I set the 'no shell' part as a defualt for future users ?

Edit /etc/default/useradd.

> how can I verify the 'no shell' is set (apart from trying to ssh login (as

Look in /etc/passwd.  The last field on each line is the shell, e.g.:

johnc:x:500:500:John Clarke:/home/johnc:/bin/bash


Cheers,

John
-- 
snort's flexresp seems a tool worthy of the BOFH himself. And of
course, with a few misplaced keystrokes you can take the entire network
down, or at least stop anyone using it - that's always a bonus.
-- James Riden
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] creating new users with no shell as a default

2005-07-28 Thread Michael Fox
On 7/29/05, Voytek <[EMAIL PROTECTED]> wrote:
> all the users on my RH server (apart from me) are web/mail users, that is,
> they only need ftp access, no ssh, no shell
> 
> is this the correct way to create them (the /bin/false part):
> 
> adduser domain.com.au -s /bin/false -p passwd
> 
> how do I set the 'no shell' part as a defualt for future users ?
> how can I verify the 'no shell' is set (apart from trying to ssh login (as
> I'm currently doing))


Debian uses a file called adduser.conf in /etc for these default
values, not sure if your RH server would also.

Worth taking a look though..
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] creating new users with no shell as a default

2005-07-28 Thread Voytek
all the users on my RH server (apart from me) are web/mail users, that is,
they only need ftp access, no ssh, no shell

is this the correct way to create them (the /bin/false part):

adduser domain.com.au -s /bin/false -p passwd

how do I set the 'no shell' part as a defualt for future users ?
how can I verify the 'no shell' is set (apart from trying to ssh login (as
I'm currently doing))


-- 
Voytek

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html