code: def _chattrib(name, key, value, param, persist=False, root=None):
      '''
      Change an attribute for a named user
      '''
      pre_info = info(name, root=root)
      if not pre_info:
          raise CommandExecutionError('User \'{0}\' does not exist'.format(name))
  
      if value == pre_info[key]:
          return True
  
      cmd = ['usermod']
  
      if root is not None and __grains__['kernel'] != 'AIX':
          cmd.extend(('-R', root))
  
      if persist and __grains__['kernel'] != 'OpenBSD':
          cmd.append('-m')
  
      cmd.extend((param, value, name))
  
      __salt__['cmd.run'](cmd, python_shell=False)
      return info(name, root=root).get(key) == valuf _chattrib(name, key, value, param, persist=False, root=None):
      '''
      Change an attribute for a named user
      '''
      pre_info = info(name, root=root)
      if not pre_info:
          raise CommandExecutionError('User \'{0}\' does not exist'.format(name))
  
      if value == pre_info[key]:
          return True
  
      cmd = ['usermod']
  
      if root is not None and __grains__['kernel'] != 'AIX':
          cmd.extend(('-R', root))
  
      if persist and __grains__['kernel'] != 'OpenBSD':
          cmd.append('-m')
  
      cmd.extend((param, value, name))
  
      __salt__['cmd.run'](cmd, python_shell=False)
      return info(name, root=root).get(key) == value
docs: Change an attribute for a named user