Re: [CentOS] Checking if a user is 'Disabled'

2008-10-30 Thread Peter Kjellstrom
On Wednesday 29 October 2008, Bill Campbell wrote: > On Wed, Oct 29, 2008, Peter Kjellstrom wrote: > >On Tuesday 28 October 2008, R P Herrold wrote: > >> On Tue, 28 Oct 2008, Tom Brown wrote: > >> > I need to create some local users but then 'disable' that user. I know > >> > i can enable and disab

Re: [CentOS] Checking if a user is 'Disabled'

2008-10-29 Thread Bill Campbell
On Wed, Oct 29, 2008, Peter Kjellstrom wrote: >On Tuesday 28 October 2008, R P Herrold wrote: >> On Tue, 28 Oct 2008, Tom Brown wrote: >> > I need to create some local users but then 'disable' that user. I know i >> > can enable and disable the user by using usermod -L and -U but does >> > anyone k

Re: [CentOS] Checking if a user is 'Disabled'

2008-10-29 Thread Peter Kjellstrom
On Tuesday 28 October 2008, R P Herrold wrote: > On Tue, 28 Oct 2008, Tom Brown wrote: > > I need to create some local users but then 'disable' that user. I know i > > can enable and disable the user by using usermod -L and -U but does > > anyone know if there is a way for me to see the current sta

Re: [CentOS] Checking if a user is 'Disabled'

2008-10-28 Thread Tom Brown
this should get you a list of all the users which have been disabled by means of `usermod -L`: perl -e 'open($SHADOW, "<", "/etc/shadow") or die( "$!\n" ); while ( <$SHADOW> ) { chomp; print "$1\n" if (/^([^:]*):!{1}[^!:]*:.*$/) } close( $SHADOW );' you'll need to run it as root. no do

Re: [CentOS] Checking if a user is 'Disabled'

2008-10-28 Thread Steve Huff
On Oct 28, 2008, at 7:46 AM, Tom Brown wrote: I need to create some local users but then 'disable' that user. I know i can enable and disable the user by using usermod -L and -U but does anyone know if there is a way for me to see the current status of the user? ie locked or unlocked? t

Re: [CentOS] Checking if a user is 'Disabled'

2008-10-28 Thread Fajar Priyanto
On Tue, Oct 28, 2008 at 7:46 PM, Tom Brown <[EMAIL PROTECTED]> wrote: > Hi > > I need to create some local users but then 'disable' that user. I know i can > enable and disable the user by using usermod -L and -U but does anyone know > if there is a way for me to see the current status of the user?