# Make serial console auto login with different user

**URL:** <https://forums.developer.nvidia.com/t/make-serial-console-auto-login-with-different-user/50856>\
**Category:** Jetson TX2\
**Created:** [June 16, 2017, 9:50pm UTC](https://forums.developer.nvidia.com/t/make-serial-console-auto-login-with-different-user/50856 "2017-06-16T21:50:45Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom88](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@tom88](https://forums.developer.nvidia.com/u/tom88)\
**Post date:** [June 16, 2017, 9:50pm UTC](https://forums.developer.nvidia.com/t/make-serial-console-auto-login-with-different-user/50856/1 "2017-06-16T21:50:45Z")

</div>

Hi,

nvidia is the default account in my serial console terminal after TX2 boots up. I am trying to make serial console auto login with a different user such as root or ubuntu or a user that I have created, but no success.

These 2 changes don’t make a difference:

1. $echo -e “[Service]\nExecStart=\nExecStart=-/sbin/agetty -a root --noclear %I $TERM” | sudo SYSTEMD\_EDITOR=tee systemctl edit getty@tty1
2. add “-a root” to “ExecStart=-/sbin/agetty --noclear %I $TERM” in file /lib/systemd/system/getty@.service

Also

Executing “logout” at the prompt logs back in nvidia account.  
Executing “sudo login root” and trying to delete nvidia account fails.

It looks as if nvidia account is not to be touched.

Thanks,  
Tom

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [June 20, 2017, 7:33am UTC](https://forums.developer.nvidia.com/t/make-serial-console-auto-login-with-different-user/50856/2 "2017-06-20T07:33:27Z")

</div>

Hi Tom,

Have you tried to modify /etc/systemd/system/serial-getty@ttyS0.service.d/autologin.conf ?

---

<div class="post-metadata">

**Author:** ![tom88](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@tom88](https://forums.developer.nvidia.com/u/tom88)\
**Post date:** [June 22, 2017, 3:55pm UTC](https://forums.developer.nvidia.com/t/make-serial-console-auto-login-with-different-user/50856/3 "2017-06-22T15:55:08Z")

</div>

Hi Wayne,

Your answer solves my problem.

Thanks,  
Tom

---

<div class="post-metadata">

**Author:** ![newman.ml.1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@newman.ml.1](https://forums.developer.nvidia.com/u/newman.ml.1)\
**Post date:** [November 3, 2017, 4:43pm UTC](https://forums.developer.nvidia.com/t/make-serial-console-auto-login-with-different-user/50856/4 "2017-11-03T16:43:21Z")

</div>

Hi Wayne or Tom,

I’m having this same problem. Could you post the change you made to the autologin.conf file that fixed it for you?

I took out the line below, and it still autologins:

ExecStart=-/sbin/agetty --autologin NVidia --keep-baud 1115200,38400,9600, %I $TERM

Thanks!

Matt

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [November 6, 2017, 9:13am UTC](https://forums.developer.nvidia.com/t/make-serial-console-auto-login-with-different-user/50856/5 "2017-11-06T09:13:38Z")

</div>

Hi newman.ml.1,

The name is “nvidia” not NVidia

---

<div class="post-metadata">

**Author:** ![newman.ml.1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@newman.ml.1](https://forums.developer.nvidia.com/u/newman.ml.1)\
**Post date:** [November 6, 2017, 11:07am UTC](https://forums.developer.nvidia.com/t/make-serial-console-auto-login-with-different-user/50856/6 "2017-11-06T11:07:48Z")

</div>

Sorry, that’s a manual copy/paste typo. The line we remove is the default line below. The system still auto logs in as user nvidia:

ExecStart=-/sbin/agetty --autologin nvidia --keep-baud 1115200,38400,9600, %I $TERM

Thanks,

Matt

---

<div class="post-metadata">

**Author:** ![linuxdev](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/linuxdev/32/10243_2.png) [@linuxdev](https://forums.developer.nvidia.com/u/linuxdev)\
**Post date:** [November 6, 2017, 8:43pm UTC](https://forums.developer.nvidia.com/t/make-serial-console-auto-login-with-different-user/50856/7 "2017-11-06T20:43:04Z")

</div>

Have you tried substituting the name “nvidia” with the user you wish to use, e.g., “ubuntu”? Also, if you try to log in as any user than make sure manual login works with that user name as well before trying to automate it (e.g., “root” won’t be allowed on Ubuntu without special steps).

---

<div class="post-metadata">

**Author:** ![newman.ml.1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@newman.ml.1](https://forums.developer.nvidia.com/u/newman.ml.1)\
**Post date:** [November 7, 2017, 7:43pm UTC](https://forums.developer.nvidia.com/t/make-serial-console-auto-login-with-different-user/50856/8 "2017-11-07T19:43:01Z")

</div>

Hi linuxdev,

Yes, I can log in as any other user I create, but only after I log out nvidia, who is logged in automatically each time.

I wish to have no user logged in automatically, so my problem is not exactly what is stated in the first help request

Thanks,

Matt

---

<div class="post-metadata">

**Author:** ![linuxdev](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/linuxdev/32/10243_2.png) [@linuxdev](https://forums.developer.nvidia.com/u/linuxdev)\
**Post date:** [November 7, 2017, 8:52pm UTC](https://forums.developer.nvidia.com/t/make-serial-console-auto-login-with-different-user/50856/9 "2017-11-07T20:52:25Z")

</div>

So is it correct that you want serial console to require a password for which ever user is picked?

If so, then you might try the following experiment (I haven’t tried this)…look for:

```auto
/etc/systemd/system/serial-getty@ttyS0.service.d/autologin.conf

```

First, see what happens if you disable the file simply by using gzip on it and rebooting. If that doesn’t do what you want, gunzip the file, and then try editing the existing line with “–autologin nvidia” to remove that part of the line (and just that part).

---

<div class="post-metadata">

**Author:** ![newman.ml.1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@newman.ml.1](https://forums.developer.nvidia.com/u/newman.ml.1)\
**Post date:** [November 16, 2017, 11:11am UTC](https://forums.developer.nvidia.com/t/make-serial-console-auto-login-with-different-user/50856/10 "2017-11-16T11:11:24Z")

</div>

Yes, I tried removing the file from the directory, and it still auto logs in as nvidia.

Same thing when I take out the “–autologin nvidia” words from the referenced line in autologin.conf:

[Service]  
ExecStart=  
ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM

In both cases, I used the GUI shutdown and re-powered with the PWR button.

---

<div class="post-metadata">

**Author:** ![linuxdev](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/linuxdev/32/10243_2.png) [@linuxdev](https://forums.developer.nvidia.com/u/linuxdev)\
**Post date:** [November 16, 2017, 7:19pm UTC](https://forums.developer.nvidia.com/t/make-serial-console-auto-login-with-different-user/50856/11 "2017-11-16T19:19:05Z")

</div>

I did a bit of research and it seems that once things hand off to Linux (U-Boot has its own mechanism) there is a config in “/etc/init/ttyS0.conf”. This looks like one of the old style init files, so it may be easier to edit than a systemd file.

The final line of this file has:

```auto
exec /sbin/getty -a ubuntu -L 115200 ttyS0

```

Try editing that line to remove the “-a ubuntu”.

---

<div class="post-metadata">

**Author:** ![nadeemm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nadeemm/32/367020_2.png) [@nadeemm](https://forums.developer.nvidia.com/u/nadeemm)\
**Post date:** [October 18, 2021, 6:27pm UTC](https://forums.developer.nvidia.com/t/make-serial-console-auto-login-with-different-user/50856/12 "2021-10-18T18:27:24Z")

</div>

Closed on October 18, 2021, 6:27pm UTC


