Ejemplo n.º 1
0
    def __init__(self, *args):
        SubCommand.__init__(self, *args)
        self._valid_types = ('mpxadmin', 'mpxconfig', 'mpxuser',
                             'pppuser', 'webdev', 'none')
        self._types = list(self._valid_types)
        self._types.remove('none')
        self._long_output = 0
        self._one = 0
        self.register_option('--all',
                             self._all_handler, """\
List all users.  By default, only users whose type is not 'none' are listed.\
""",
                             ['-a'])
        self.register_option('--type',
                             self._type_handler, """\
List only users of a specific user type.\
""",
                             ['-t'])
        self.register_option('--long',
                             self._long_handler, """\
List information about the user, as well as the user name.\
""",
                             ['-l'])
        self.register_option('-1',
                             self._one_handler, """\
List names in a single column.  Useful for piping through grep, etc.""",[])
        return
Ejemplo n.º 2
0
 def __init__(self, *args):
     SubCommand.__init__(self, *args)
     # Register "mpxadmin user rename" command.
     User_Rename(self, "rename", ("rn", "mv"))
     # Register "mpxadmin user passwd" command.
     User_Passwd(self, "passwd")
     # Register "mpxadmin user add"
     User_Add(self, "add")
     # Register "mpxadmin user list"
     User_List(self, "list", ("ls", ))
     # Register "mpxadmin user delete" command.
     User_Delete(self, "delete", ("del", ))
     return
Ejemplo n.º 3
0
 def __init__(self, *args):
     SubCommand.__init__(self, *args)
     # Register "mpxadmin user rename" command.
     User_Rename(self, "rename", ("rn","mv"))
     # Register "mpxadmin user passwd" command.
     User_Passwd(self, "passwd")
     # Register "mpxadmin user add"
     User_Add(self, "add")
     # Register "mpxadmin user list"
     User_List(self, "list", ("ls",))
     # Register "mpxadmin user delete" command.
     User_Delete(self, "delete", ("del",))
     return
Ejemplo n.º 4
0
    def __init__(self, *args):
        SubCommand.__init__(self, *args)
        PasswdMixin.__init__(self)
        self._user_type = 'none'
        self.register_option('--uid',
                             self._uid_handler, """\
uid  Explicitly force the user id.

By default the user id is calculated.""",
                             ['-u'])
        self.register_option('--group',
                             self._group_handler, """\
group  Explicitly force the user's primary login group by name or number.

The group name must exist. A group number must refer to an already existing
group.

By default the primary group is a new group, named the same as the user.""",
                             ['-g'])
        self.register_option('--groups',
                             self._groups_handler, """\
group,[...]  A list of supplementary groups which the user is also a member
             of.

             By default, the list of suplimentary groups is managed by the
             type.

             Each group is separated from the next by a comma, with no
             intervening whitespace.  The groups are subject to the same
             restrictions as the group given with the --group option.  The
             default is for the user to belong only to the initial group.""",
                             ['-G'])
        self.register_option('--shell',
                             self._shell_handler, """\
  Specify the user's login shell.

  By default the shell is determined by the user's type.  Some types can not
  use this option to override the user's shell (pppuser)""",
                             ['-s'])
        return
Ejemplo n.º 5
0
    def __init__(self, *args):
        SubCommand.__init__(self, *args)
        PasswdMixin.__init__(self)
        self._user_type = 'none'
        self.register_option(
            '--uid', self._uid_handler, """\
uid  Explicitly force the user id.

By default the user id is calculated.""", ['-u'])
        self.register_option(
            '--group', self._group_handler, """\
group  Explicitly force the user's primary login group by name or number.

The group name must exist. A group number must refer to an already existing
group.

By default the primary group is a new group, named the same as the user.""",
            ['-g'])
        self.register_option(
            '--groups', self._groups_handler, """\
group,[...]  A list of supplementary groups which the user is also a member
             of.

             By default, the list of suplimentary groups is managed by the
             type.

             Each group is separated from the next by a comma, with no
             intervening whitespace.  The groups are subject to the same
             restrictions as the group given with the --group option.  The
             default is for the user to belong only to the initial group.""",
            ['-G'])
        self.register_option(
            '--shell', self._shell_handler, """\
  Specify the user's login shell.

  By default the shell is determined by the user's type.  Some types can not
  use this option to override the user's shell (pppuser)""", ['-s'])
        return
Ejemplo n.º 6
0
    def __init__(self, *args):
        SubCommand.__init__(self, *args)
        self._valid_types = ('mpxadmin', 'mpxconfig', 'mpxuser', 'pppuser',
                             'webdev', 'none')
        self._types = list(self._valid_types)
        self._types.remove('none')
        self._long_output = 0
        self._one = 0
        self.register_option(
            '--all', self._all_handler, """\
List all users.  By default, only users whose type is not 'none' are listed.\
""", ['-a'])
        self.register_option(
            '--type', self._type_handler, """\
List only users of a specific user type.\
""", ['-t'])
        self.register_option(
            '--long', self._long_handler, """\
List information about the user, as well as the user name.\
""", ['-l'])
        self.register_option(
            '-1', self._one_handler, """\
List names in a single column.  Useful for piping through grep, etc.""", [])
        return
Ejemplo n.º 7
0
 def __init__(self, *args):
     SubCommand.__init__(self, *args)
     UserMixin.__init__(self)
     return
Ejemplo n.º 8
0
 def __init__(self, *args):
     SubCommand.__init__(self, *args)
     PasswdMixin.__init__(self)
     return
Ejemplo n.º 9
0
 def __init__(self, *args):
     SubCommand.__init__(self, *args)
     UserMixin.__init__(self)
     return
Ejemplo n.º 10
0
 def __init__(self, *args):
     SubCommand.__init__(self, *args)
     PasswdMixin.__init__(self)
     return