Re: Different ways of locking accounts

2007-03-17 Thread Wei Chen
On 3/18/07, Albert Dengg <[EMAIL PROTECTED]> wrote: On Sun, Mar 18, 2007 at 01:08:13AM +0800, Wei Chen wrote: ... > >BTW, both methods lock shells as well as ftp and sftp. Changing the shell > >to > >> /usr/sbin/nologin allows ftp but still prevents sftp. > >> Is there a method that locks shell

Re: Different ways of locking accounts

2007-03-17 Thread Albert Dengg
On Sun, Mar 18, 2007 at 01:08:13AM +0800, Wei Chen wrote: ... > >BTW, both methods lock shells as well as ftp and sftp. Changing the shell > >to > >> /usr/sbin/nologin allows ftp but still prevents sftp. > >> Is there a method that locks shell but allows ftp and sftp? Thanks. > >> > >I think that y

Re: Different ways of locking accounts

2007-03-17 Thread Wei Chen
On 3/18/07, Roberto C. Sanchez <[EMAIL PROTECTED]> wrote: On Sun, Mar 18, 2007 at 12:44:18AM +0800, Wei Chen wrote: > > Will there be problem if I lock an account with one program and unlock with > another? > I don't know. Why don't you try it and see? :-) I just tried and the answer is yes.

Re: Different ways of locking accounts

2007-03-17 Thread Roberto C. Sanchez
On Sun, Mar 18, 2007 at 12:44:18AM +0800, Wei Chen wrote: > > Will there be problem if I lock an account with one program and unlock with > another? > I don't know. Why don't you try it and see? :-) > BTW, both methods lock shells as well as ftp and sftp. Changing the shell to > /usr/sbin/nolog

Re: Different ways of locking accounts

2007-03-17 Thread Wei Chen
On 3/18/07, Roberto C. Sanchez <[EMAIL PROTECTED]> wrote: On Sun, Mar 18, 2007 at 12:18:55AM +0800, Wei Chen wrote: > Hi, > > I recently found ways that can lock user accounts on the local machine, > including "passwd -l" and "usermod -L". > > I am wondering now what is the difference between th

Re: Different ways of locking accounts

2007-03-17 Thread Roberto C. Sanchez
On Sun, Mar 18, 2007 at 12:18:55AM +0800, Wei Chen wrote: > Hi, > > I recently found ways that can lock user accounts on the local machine, > including "passwd -l" and "usermod -L". > > I am wondering now what is the difference between the two commands and which > one is preferred (or standard, o