From: Lew Pitcher on
On Jun 11, 12:55 pm, underh20 <underh20.scubadiv...(a)gmail.com> wrote:
> On Jun 11, 6:55 am, Lew Pitcher <lpitc...(a)teksavvy.com> wrote:
>
>
>
> > On June 10, 2010 14:55, in comp.unix.admin, underh20.scubadiv...(a)gmail.com
> > wrote:
>
> > > Hi,
>
> > > We need to port our script from Solaris 10 to RedHat linux.  The
> > > script creates a list of Unix user ids that is non-root and with
> > > password not "LK/loccked" via the command (below at end).  The script
> > > utilitzes the #passwd -as" command in Solaris where attributes of each
> > > user is displayed (see below).
> > [snip]
> > > # passwd -as| grep -v LK|grep -v NL|grep -v root|cut -d" " -f1 > uLIST
>
> > passwd -aS | awk '$1 != "root" && $2 != "L" { print $1}'
>
> > --
> > Lew Pitcher
> > Master Codewright & JOAT-in-training   | Registered Linux User #112576
> > Me:http://pitcher.digitalfreehold.ca/|Just Linux:http://justlinux.ca/
> > ----------      Slackware - Because I know what I'm doing.         ------
>
> Thanks Lew for the alternative way to write the command.

It's *not* an "alternative", it's the *Linux equivalent* of your
Solaris command.

> Since we are porting the script to Linux and it doesn't have "-as" option in the passwd
> command.

Linux passwd(1) uses the -S option /instead/ of the -s option.

In Solaris
passwd -as

In Linux
passwd -aS


> How could we rewrite Lew's command line below to produce the same user
> list output without the "-as" command.  Anyone has an idea ?  thanks,  Bill

Well, you /could/ awk parse the /etc/passwd database yourself, but why
bother?

> passwd -aS | awk '$1 != "root" && $2 != "L" { print $1}'

Works on Linux

# uname -a
Linux bitsie 2.6.27.7-smp #2 SMP Thu Nov 20 22:32:43 CST 2008 i686
AMD Phenom(tm) 9500 Quad-Core Processor AuthenticAMD GNU/Linux
# passwd -aS | awk '$1 != "root" && $2 != "L" {print $1}'
lpitcher
tmercurio
guest
mrobbins
# passwd -aS
root P 06/10/2010 0 -1 -1 -1
bin L 10/28/1996 0 -1 -1 -1
daemon L 10/28/1996 0 -1 -1 -1
adm L 10/28/1996 0 -1 -1 -1
lp L 10/28/1996 0 -1 -1 -1
sync L 10/28/1996 0 -1 -1 -1
shutdown L 10/28/1996 0 -1 -1 -1
...
From: realto on
On Jun 25, 8:48 am, Lew Pitcher <lpitc...(a)teksavvy.com> wrote:

Lew Pitcher, recently let go by TDBank, is a domain thief.

Way to go, Lew, you pathetic piece of internet trash!

Check out http://lewpitcher.ca for further info.
From: realto on
On Jun 25, 8:48 am, Lew Pitcher <lpitc...(a)teksavvy.com> wrote:

Brampton's Lew Pitcher, formerly of TDBank, is a domain thief.

For further info: http://lewpitcher.ca

Or simply google "Lew Pitcher"
First  |  Prev  | 
Pages: 1 2
Prev: sftp queries
Next: Which CPU or core to disable?