An image forming apparatus comprising: setting means for making a setting for rejecting reception of a command including authentication information which is not a hash value or an encrypted value; reception means for receiving a command including authentication information via a network or from inside the image forming apparatus, the command being for executing a job; determination means for determining whether or not the authentication information included in the command received by said reception means is a hash value or encrypted value; and control means for causing, in a case where the setting has been made by the setting means and it is determined by said determination means that the authentication information is a hash value or an encrypted value, the job to be executed in accordance with the received command depending on authentication performed based on the authentication information, and causing, in a case where the setting has been made by the setting means and it is determined by said determination means that the authentication information is not a hash value or an encrypted value, the job not to be executed in accordance with the received command, wherein said control means causes, in a case where the setting has not been made by said setting means, the job to be executed in accordance with the received command depending on the authentication performed based on the authentication information, even when the authentication information is not a hash value or an encrypted value, and characterized in that said control means causes, in a case where the setting has been made by the setting means and it is determined that the command has been transmitted from the inside of the image forming apparatus, the job to be executed in accordance with the received command depending on authentication performed based on the authentication information, regardless of whether the authentication information is a hash value or an encrypted value. setting means for making a setting for rejecting reception of a command including authentication information which is not a hash value or an encrypted value; reception means for receiving a command including authentication information via a network or from inside the image forming apparatus, the command being for executing a job; determination means for determining whether or not the authentication information included in the command received by said reception means is a hash value or encrypted value; and control means for causing, in a case where the setting has been made by the setting means and it is determined by said determination means that the authentication information is a hash value or an encrypted value, the job to be executed in accordance with the received command depending on authentication performed based on the authentication information, and causing, in a case where the setting has been made by the setting means and it is determined by said determination means that the authentication information is not a hash value or an encrypted value, the job not to be executed in accordance with the received command, wherein said control means causes, in a case where the setting has not been made by said setting means, the job to be executed in accordance with the received command depending on the authentication performed based on the authentication information, even when the authentication information is not a hash value or an encrypted value, and characterized in that said control means causes, in a case where the setting has been made by the setting means and it is determined that the command has been transmitted from the inside of the image forming apparatus, the job to be executed in accordance with the received command depending on authentication performed based on the authentication information, regardless of whether the authentication information is a hash value or an encrypted value.