Re: Need Textmode Commands

From: Stephane CHAZELAS (this.address_at_is.invalid)
Date: 11/16/03

  • Next message: trifon: "Can a shell be an "interpreter"?"
    Date: Sun, 16 Nov 2003 22:42:22 +0100
    
    

    2003/11/16, 14:26(-06), Yevgen Muntyan:
    > Hey, relax, don't be so serious. Better read again item 12. Isn't it funny?
    >
    > > 12. How many users are defined on your system? Don't count them, let
    > > the computer do it for you!

    That one is not easy. First, do two user names with the same uid
    identify one or two users? What about shadow disabled users?

    Then, what if the user database is distributed in /etc/passwd,
    hesiod, a db file, NIS+, ldap, a proprietary one...

    getpwent doesn't work for all the kinds of database (I think it
    doesn't work for hesiod, you'd have to use dig or something like
    this if the name server accepts to provide the list).

    I can't think of any portable way to do it.

    -- 
    Stéphane                      ["Stephane.Chazelas" at "free.fr"]
    

  • Next message: trifon: "Can a shell be an "interpreter"?"