def chloginclass(name, loginclass, root=None):
 if (__grains__['kernel'] != 'OpenBSD'):
  return False
 if (loginclass == get_loginclass(name)):
  return True
 cmd = ['usermod', '-L', '{0}'.format(loginclass), '{0}'.format(name)]
 if (root is not None):
  cmd.extend(('-R', root))
 __salt__['cmd.run'](cmd, python_shell=False)
 return (get_loginclass(name) == loginclass)

def chloginclass ( name , loginclass , root = None ) : if ( __grains__ [ 'kernel' ] != 'OpenBSD' ) : return False if ( loginclass == get_loginclass ( name ) ) : return True cmd = [ 'usermod' , '-L' , '{0}' . format ( loginclass ) , '{0}' . format ( name ) ] if ( root is not None ) : cmd . extend ( ( '-R' , root ) ) __salt__ [ 'cmd.run' ] ( cmd , python_shell = False ) return ( get_loginclass ( name ) == loginclass )
change the default login class of the user .