How do I set a password for guest login

First,

It might be to your advantage to find how the guest account is to be used.

Some important points are:

  • According to the outdated documentation for Guest user accounts for Ubuntu: 'A guest account allows visitors to use the computer system without login credentials.' So the whole point of the user is to have no password.

  • Ask far as I know, the guest account purges documents or files written into its home directory (which is actually in /tmp) after the session is terminated. This is shown in this comment by @andol.

  • Taking these things into accounts, primarily, the guest account should be used for:

    • Persons with no registered account on your computer
    • If you need to quickly access the internet or do something that will not need to be permanently stored.
    • To restrict use of your account and files by unknown user, but still allowing limited use.

So, now I think you can see that the Guest Account should not be used as a legitimate account for your computer, but like a Library or public computer: unless you have a USB or similar, you're files are as good as gone. Therefore, you should have no need to password-protect the guest account at all.

What should you do?

If I were you I would make a whole new account, depending on your intentions. If you were looking for an account that wouldn't show your files but could still be used by others (like a young sister) I would just create a new account.

Additionally, you could also make your own Guest Account and disable the one that came with Ubuntu 12.04 and later.

You can do this by following the steps on the Technology Windows & Linux website.

Alternatively, in theory, you could use the passwd command. I haven't tried this before, so its just a guess: but you would type either sudo passwd guest or passwd guest. It may not work, and I don't think it's a great idea because of the reasons I have listed above.

Good luck!