Guest account delete

Do you want to delete Guest User ? If yes why ?

Yes, I want to. Simply because I did not create it and it says system user event thought I remove all permissions from it.

It is system generated User and you can’t delete Standard User’s. As they have specific purpose.

What is the specific purpose of it? can some one used it to get into the system?

You can delete Guest account follow below steps:

Customer list>>Guest>>Menu>>Delete

If there is not any transactions are made for guest then you will be able to delete, else you have to delete transactions first then account.

There is no transaction under a guest account. The system just installs and there is no Customer list>>Guest>>Menu>>Delete. What version of the system you are using?

I tried to delete the guest account and after deletion of guest account erpnext website stopped working. Let me explain you why?

Every time when anonymous user visit to erpnext website, frappe consider it as a guest user. If frappe failed to find the guest user it’ll throw the error and then no one can login into the system until you create guest user using frappe backend python api.

Error traceback:

Traceback (most recent call last):
  File "/home/navdeep/frappe-bench/apps/frappe/frappe/", line 59, in application
  File "/home/navdeep/frappe-bench/apps/frappe/frappe/", line 121, in init_request
    frappe.local.http_request = frappe.auth.HTTPRequest()
  File "/home/navdeep/frappe-bench/apps/frappe/frappe/", line 53, in __init__
    frappe.local.login_manager = LoginManager()
  File "/home/navdeep/frappe-bench/apps/frappe/frappe/", line 120, in __init__
  File "/home/navdeep/frappe-bench/apps/frappe/frappe/", line 146, in set_user_info
    self.full_name = " ".join(filter(None, [,
AttributeError: 'NoneType' object has no attribute 'first_name'
1 Like

It’s not recommend to delete Guest Account.

Guest User name is reserved for Frappe Auth System.

class LoginManager:
        def __init__(self):
                self.user = None
       = None
                self.full_name = None
                self.user_type = None

                if frappe.local.form_dict.get('cmd')=='login' or frappe.local.request.path=="/api/method/login":
                        if self.login()==False: return
                        self.resume = False

                        # run login triggers
                                self.resume = True
                        except AttributeError:
                                self.user = "Guest"

self.user = “Guest”

1 Like

Thanks @navdeepghai for your explanation.

1 Like

Thank everyone for the explanation. I just want to ensure the system is 100% secure.

1 Like