# Can I turn auto-login off?

**URL:** <https://forum.clockworkpi.com/t/can-i-turn-auto-login-off/7837>\
**Category:** DevTerm\
**Created:** [January 7, 2022, 10:01am UTC](https://forum.clockworkpi.com/t/can-i-turn-auto-login-off/7837 "2022-01-07T10:01:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tootles](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/tootles/32/4619_2.png) [@Tootles](https://forum.clockworkpi.com/u/Tootles)\
**Post date:** [January 7, 2022, 10:01am UTC](https://forum.clockworkpi.com/t/can-i-turn-auto-login-off/7837/1 "2022-01-07T10:01:06Z")

</div>

I made a new user account on my A04 - didn’t want to use the cpi account and don’t fancy messing around with changing the name and so on, because it’s been a looong time (like ten years) since I did anything serious Linux. Except there doesn’t appear to be a way to prevent it starting a session logged in as cpi.

Is there a conf or script I can edit to have it run the graphical login instead of just automatically logging me in as cpi?

Thanks.

---

<div class="post-metadata">

**Author:** ![stefan](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@stefan](https://forum.clockworkpi.com/u/stefan)\
**Post date:** [January 7, 2022, 2:40pm UTC](https://forum.clockworkpi.com/t/can-i-turn-auto-login-off/7837/2 "2022-01-07T14:40:39Z")

</div>

look here:

> [@Changing username](https://forum.clockworkpi.com/t/changing-username/7753/3):
>
> For ClockworkOS, you won’t need to change your username to use your DevTerm. However, if you want (I certainly have), you can change it by following these steps: Log out of your current desktop session (Applications \> Log Out — pressing the power button will also bring up the menu) Press the following keyboard combination: Fn + Ctrl + Alt + 1 (F1) Log in as root — the password is cpi Execute killall -u cpi to stop all processes under the user you want to rename Execute usermod -l newname -m -…

---

<div class="post-metadata">

**Author:** ![Tootles](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/tootles/32/4619_2.png) [@Tootles](https://forum.clockworkpi.com/u/Tootles)\
**Post date:** [January 7, 2022, 2:47pm UTC](https://forum.clockworkpi.com/t/can-i-turn-auto-login-off/7837/3 "2022-01-07T14:47:30Z")

</div>

I’ve seen that, but it’s not what I want. What I’m after is for it to boot to a login screen instead of to cpi’s desktop. Then I’ll just remove (or hide) the cpi account. I’ve already made a new account for myself and I specifically _want_ to have to enter my password in order to log in.

---

<div class="post-metadata">

**Author:** ![henryhu](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/henryhu/32/4456_2.png) [@henryhu](https://forum.clockworkpi.com/u/henryhu)\
**Post date:** [January 7, 2022, 2:54pm UTC](https://forum.clockworkpi.com/t/can-i-turn-auto-login-off/7837/4 "2022-01-07T14:54:47Z")

</div>

Remove `/etc/lightdm/lightdm.conf.d/12-autologin.conf`

---

<div class="post-metadata">

**Author:** ![Tootles](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/tootles/32/4619_2.png) [@Tootles](https://forum.clockworkpi.com/u/Tootles)\
**Post date:** [January 7, 2022, 3:02pm UTC](https://forum.clockworkpi.com/t/can-i-turn-auto-login-off/7837/5 "2022-01-07T15:02:22Z")

</div>

I removed that and rebooted but it did it anyway - logged me straight back in as cpi. Then, experimentally, I put the file back and changed the contents to autologin to the account I created and rebooted again, and it’s still logging in as cpi when I boot.

It looks like it might be going by uid, as it’s specifying uid 1000 before indicating the name. I’m tempted to logout of cpi and edit /etc/passwd to swap the uids round to see what happens.

**Edit** : I did just that and now it’s wanting to login as uid 1001 (cpi’s uid now after swapping), though it appears to have hung.

**Edit 2** : definitely hung, only thing it’ll respond to is a three-finger salute. Looks like I’ll have to rewrite the OS image on the SD card.

**Edit 3** : I fixed /etc/passwd after remembering I have an ext3 fs driver on my main desktop and edited it back. But now I’m back to autologging in as cpi, haha.

---

<div class="post-metadata">

**Author:** ![henryhu](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/henryhu/32/4456_2.png) [@henryhu](https://forum.clockworkpi.com/u/henryhu)\
**Post date:** [January 7, 2022, 8:55pm UTC](https://forum.clockworkpi.com/t/can-i-turn-auto-login-off/7837/6 "2022-01-07T20:55:12Z")

</div>

Ah, you’re right, I was fooled. We should change /etc/gdm3/custom.conf instead.  
I thought we’re using lightdm, but actually we’re using gdm3 (I don’t know why lightdm is also installed, though, and we even have a custom config for it).

---

<div class="post-metadata">

**Author:** ![Tootles](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/tootles/32/4619_2.png) [@Tootles](https://forum.clockworkpi.com/u/Tootles)\
**Post date:** [January 7, 2022, 9:50pm UTC](https://forum.clockworkpi.com/t/can-i-turn-auto-login-off/7837/7 "2022-01-07T21:50:03Z")

</div>

No worries. I went back and looked at the guide stefan linked, and it did exactly what I wanted to. I should have listened.

---

<div class="post-metadata">

**Author:** ![zerker](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/zerker/32/5744_2.png) [@zerker](https://forum.clockworkpi.com/u/zerker)\
**Post date:** [January 8, 2022, 4:44pm UTC](https://forum.clockworkpi.com/t/can-i-turn-auto-login-off/7837/8 "2022-01-08T16:44:21Z")

</div>

I just created an entirely separate user for myself and deleted the cpi user. Did the trick here 😃
