# How to disable token if password defined

**URL:** <https://discourse.jupyter.org/t/how-to-disable-token-if-password-defined/4173>\
**Category:** General\
**Created:** [April 27, 2020, 1:38pm UTC](https://discourse.jupyter.org/t/how-to-disable-token-if-password-defined/4173 "2020-04-27T13:38:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpjohans](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@mpjohans](https://discourse.jupyter.org/u/mpjohans)\
**Post date:** [April 27, 2020, 1:38pm UTC](https://discourse.jupyter.org/t/how-to-disable-token-if-password-defined/4173/1 "2020-04-27T13:38:17Z")

</div>

Hello there,

I’m setting up an image of a Jupyter notebook server, and have defined a default token for accessing the notebook, via the config file parameter:  
c.NotebookApp.token = ‘default’

The idea is that users of the image use the token to define a password by only having access to the web interface. It works to the extent that one can give a password, and then subsequently login using that password.

The problem is, that one can still always log in with the default token. **Is there a way to define that if a password is set, the defined token should not be used?**

Cheers,  
Mikael
