A private feature of Android 5 Lollipop is the system-level guest mode that lets you create guest accounts on your phone. The guest account does not have any of your personal data such as messages, installed apps or preferences. The guest account makes it easy to share your phone with your friends and family members. Also, it can be useful to sign in on someone’s phone if you lose your device.
To enable guest mode on Android 5 Lollipop, just pull down the notifications bar, tap your avatar twice, and then tap Add guest option. Your phone will now switch to guest mode. However, the guest mode has few shortcomings as pointed out in the first paragraph. To disable guest account option on your phone required root access on it. If your phone is rooted and running on Android 5 Lollipop, follow the instruction given below. Warning: The following method is highly risky, as it employs editing system file. Follow the instruction at your own risk. We will not be liable if any damage occurs to your device and/or its components. It is recommended for technically talented users only.
- Install ES File Explorer [HERE] from Play store.
- Also, install any Root Capable SQLLite Editor. For instance, SQLite Editor [Download Here] that is a paid app.
- Now, remove any existing guest account (extra accounts) from your phone (tap on the user icon on the top to get remove option).
- Open ES File Explorer, enable Root Explorer and then navigate to system/build.prop and open the build.prop file with ES Note Editor.
- Add the following line to the end of the build:prop file fw.max_users=1
- Save the file and exit.
- Now, with the SQLLite editor, go to /data/data/com.android.providers.settings/databases/settings.db and open the “Global” table.
- Navigate to the entry and edit the entry to change the value to “0”.
- Save your editing and exit.
- Finally, reboot your phone Now, the “User Accounts” option is no longer available on your phone, so that the guest account cannot be used (Source – Reddit)