lib/chef/provider/user/dscl.rb
#
# Sets the user id for the user using dscl.
# If a `uid` is not specified, it finds the next available one starting
# from 200 if `system` is set, 500 otherwise.
#
Sets the user id for the user using dscl.
If a `uid` is not specified, it finds the next available one starting
from 200 if `system` is set, 500 otherwise.
Sets the user id for the user using dscl . If a ` uid ` is not specified it finds the next available one starting from 200 if ` system ` is set 500 otherwise .
def dscl_set_uid
          @new_resource.uid(get_free_uid) if (@new_resource.uid.nil? || @new_resource.uid == '')
          if uid_used?(@new_resource.uid)
            raise(Chef::Exceptions::RequestedUIDUnavailable, "uid #{@new_resource.uid} is already in use")
          end
          run_dscl("create /Users/#{@new_resource.username} UniqueID #{@new_resource.uid}")
        end
def dscl_set_uid @new_resource . uid ( get_free_uid ) if ( @new_resource . uid . nil? || @new_resource . uid == '' ) if uid_used? ( @new_resource . uid ) raise ( Chef :: Exceptions :: RequestedUIDUnavailable , "uid #{@new_resource.uid} is already in use" ) end run_dscl ( "create /Users/#{@new_resource.username} UniqueID #{@new_resource.uid}" ) end
Sets the user id for the user using dscl.
Sets the user id for the user using dscl .