code: def adduser(name, username):
      '''
      Add a user in the group.
  
      CLI Example:
  
      .. code-block:: bash
  
           salt '*' group.adduser foo bar
  
      Verifies if a valid username 'bar' as a member of an existing group 'foo',
      if not then adds it.
      '''
      # Note: pw exits with code 65 if group is unknown
      retcode = __salt__['cmd.retcode']('pw groupmod {0} -m {1}'.format(
          name, username), python_shell=False)
  
      return not retcodf adduser(name, username):
      '''
      Add a user in the group.
  
      CLI Example:
  
      .. code-block:: bash
  
           salt '*' group.adduser foo bar
  
      Verifies if a valid username 'bar' as a member of an existing group 'foo',
      if not then adds it.
      '''
      # Note: pw exits with code 65 if group is unknown
      retcode = __salt__['cmd.retcode']('pw groupmod {0} -m {1}'.format(
          name, username), python_shell=False)
  
      return not retcode
docs: Add a user in the group.
  
      CLI Example:
  
      .. code-block:: bash
  
           salt '*' group.adduser foo bar
  
      Verifies if a valid username 'bar' as a member of an existing group 'foo',
      if not then adds it.