Logo Search packages:      
Sourcecode: sabayon version File versions  Download package

def lib::userdb::UserDatabase::get_users (   self  ) 

Return the list of users on the system. These should
be real users - i.e. should not include system users
like nobody, gdm, nfsnobody etc.

Definition at line 440 of file userdb.py.

00440                         :
        """Return the list of users on the system. These should
        be real users - i.e. should not include system users
        like nobody, gdm, nfsnobody etc.
        """
      list = []
      try:
          users = pwd.getpwall()
      except:
          raise UserDatabaseException(_("Failed to get the user list"))

      for user in pwd.getpwall():
          try:
              # remove non-users
            if user[2] < 500:
                continue
            if user[0] in list:
                continue
            if user[6] == "" or string.find(user[6], "nologin") != -1:
                continue
            list.append(user[0])
          except:
            pass
      return list



user_database = None


Generated by  Doxygen 1.6.0   Back to index