<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Groin1655</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Groin1655"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Groin1655"/>
	<updated>2026-05-01T23:36:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:TTY_Autologin&amp;diff=29237</id>
		<title>Talk:TTY Autologin</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:TTY_Autologin&amp;diff=29237"/>
		<updated>2025-03-11T22:28:48Z</updated>

		<summary type="html">&lt;p&gt;Groin1655: /* By using agetty (CLI Proxmox) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Isn&#039;t this just reinventing the wheel? ==&lt;br /&gt;
&amp;lt;s&amp;gt;Instead of going through the trouble of compiling something, wouldn&#039;t it be much easier to &amp;lt;code&amp;gt;apk add {{pkg|agetty}}&amp;lt;/code&amp;gt; (from main) and use the {{key|-a}} (&amp;lt;small&amp;gt;{{key|--autologin}}&amp;lt;/small&amp;gt;) option?&amp;lt;/s&amp;gt; &amp;amp;ndash;zcrayfish ([[User talk:zcrayfish|talk]]•[[Special:Contributions/zcrayfish|contribs]]•[[Special:EmailUser/zcrayfish|send email]]) 02:13, 11 September 2023 (UTC)&lt;br /&gt;
:Disregard because I edited the article to have both. (the agetty option was needed for the non-edge users in any case) &amp;amp;ndash;[[User:zcrayfish|zcrayfish]] &amp;lt;small&amp;gt;([[User talk:zcrayfish|talk]]•[[Special:Contributions/zcrayfish|contribs]]•[[Special:EmailUser/zcrayfish|send email]])&amp;lt;/small&amp;gt; 08:32, 12 September 2023 (UTC)&lt;br /&gt;
::tcc is not a mandatory package, it is just a C compiler, I initially choose it because it is small (~1Mb) in contrast to gcc (&amp;gt;100Mb), but if the issue is that it is on edge, then it is enough to use gcc which is in main, simple as that. Also agetty is times larger then a mere system call. &amp;amp;ndash;[[User:MarcoDG |MarcoDG]] 08:39, 15 September 2023 (CET)&lt;br /&gt;
&lt;br /&gt;
== By using agetty (CLI Proxmox) ==&lt;br /&gt;
&lt;br /&gt;
Hi [[User:Groin1655]],  I have never used Proxmox, so need your help. Can you please clarify if the changes suggested by you has to be done in the Proxmox guest or the host alpine OS. btw:are you running diskless either in host or guest? because diskless tool [[Alpine local backup|lbu]] &#039;&#039;&#039;does not&#039;&#039;&#039; track files outside /etc drive. The previous instructions were there for a long time and i&#039;m curious about your use case. &lt;br /&gt;
Please add necessary qualifiers and if necessary we can create and move the content to Proxmox page and just put a pointer here, so that other users are not affected.   -[[User:Prabuanand|Prabuanand]] ([[User talk:Prabuanand|talk]]) 04:31, 5 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi [[User:Prabuanand|Prabuanand]], I am building a LXC container based on Alpine linux and wanted the have it perform an autologin on startup. The changes were done in the disk-based guest. The host OS is debian 12. I will change the procedure as needed, when I get it working. Currently after each reboot the /etc/inittab is getting modified and my changes to the line &amp;quot;tty1::respawn:/sbin/getty 38400 tty1&amp;quot; are being restored. The comments are not. So there must be a script somehere. I dont know what it is rewriting the lines.  --[[User:Groin1655|Groin1655]] ([[User talk:Groin1655|talk]]) 01:21, 7 March 2025 (UTC)&lt;br /&gt;
::Hi [[User:Prabuanand|Prabuanand]], I completed my goal to perform an autologin in the Alpine LXC container for Proxmox. Feel free to edit/move my contribution to the correct place as I am not really familiar with this wiki. [[User:Groin1655|Groin1655]] ([[User talk:Groin1655|talk]]) 22:28, 11 March 2025 (UTC)&lt;/div&gt;</summary>
		<author><name>Groin1655</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=TTY_Autologin&amp;diff=29236</id>
		<title>TTY Autologin</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=TTY_Autologin&amp;diff=29236"/>
		<updated>2025-03-11T22:25:13Z</updated>

		<summary type="html">&lt;p&gt;Groin1655: /* By using agetty (CLI Proxmox) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents how to setup autologin to tty. Once configured, when computer is powered on, you will be logged in automatically without typing password. Note that, if someone else starts up your computer, they will be able to access your account and your personal data. &lt;br /&gt;
&lt;br /&gt;
== By using agetty ==&lt;br /&gt;
&lt;br /&gt;
Install {{pkg|agetty}}: {{cmd|# apk add agetty}}&lt;br /&gt;
&lt;br /&gt;
Edit {{path|/etc/inittab}} to use agetty&amp;lt;br&amp;gt;&lt;br /&gt;
Example for the virtual terminal tty1:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;tty1::respawn:/sbin/agetty --autologin root tty1 linux&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example inittab entry for a serial terminal on ttys01:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;ttyS0::respawn:/sbin/agetty --autologin root ttyS0 vt100&amp;lt;/code&amp;gt;&lt;br /&gt;
{{tip|You can change the `tty1` or `ttyS0` to a different serial port or virtual terminal as you please. `root` can be changed to a different user as well. Finally the terminal type (`linux` and `vt100` in our examples) can be changed to a wide variety of serial terminals.}}&lt;br /&gt;
&lt;br /&gt;
== By using agetty (CLI Proxmox) ==&lt;br /&gt;
&lt;br /&gt;
Proxmox (8.3.2) host has a setup_init script for Alpine linux at {{path|/usr/share/perl5/PVE/LXC/Setup/Alpine.pm}} that overwrites all changes to tty lines in {{path|/etc/inittab}}.&lt;br /&gt;
&lt;br /&gt;
Modify the script at {{path|/usr/share/perl5/PVE/LXC/Setup/Alpine.pm}} and add the following lines in setup_init (not to modify the {{path|/etc/inittab}} file if it contains the word &amp;quot;agetty&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;...&lt;br /&gt;
my $inittab = $self-&amp;gt;ct_file_get_contents($filename);&lt;br /&gt;
&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
56:   if ($inittab =~ /agetty/) {&lt;br /&gt;
57:        return;&lt;br /&gt;
58:    }&lt;br /&gt;
&amp;lt;----&lt;br /&gt;
&lt;br /&gt;
my @lines = grep {&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes are marked with current line numbers.&lt;br /&gt;
&lt;br /&gt;
After running the LXC container perform the following steps in it:&lt;br /&gt;
&lt;br /&gt;
# Install {{pkg|agetty}}: {{cmd|# apk add agetty}}&lt;br /&gt;
# Modify this line in {{path|/etc/inittab}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tty1::respawn:/sbin/agetty --autologin root --noclear 38400 tty1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After a reboot the container will perform an autologin.&lt;br /&gt;
&lt;br /&gt;
== By making your own autologin wrapper ==&lt;br /&gt;
&lt;br /&gt;
Create a script, called autologin, around {{path|/bin/login}} and moving it in {{path|/usr/sbin/}} and editing {{path|/etc/inittab}} to specify the use of {{path|/usr/sbin/autologin}} instead of {{path|/bin/login}}.&lt;br /&gt;
&lt;br /&gt;
# Create and edit the autologin wrapper script {{path|/usr/sbin/autologin}} as follows:{{cat|/usr/sbin/autologin|#!/bin/sh&lt;br /&gt;
exec login -f root}}&lt;br /&gt;
# Remember to make the scripts executable: {{cmd|# chmod +x /usr/sbin/autologin}}&lt;br /&gt;
# The script executes the &#039;&#039;login&#039;&#039; binary (part of busybox) which will be searched in $PATH. As parameters are passed:&lt;br /&gt;
#:   &#039;&#039;&#039;-f&#039;&#039;&#039;  flag which stands for &amp;quot;Do not authenticate (user already authenticated)&amp;quot;&lt;br /&gt;
#:   &#039;&#039;username&#039;&#039; in this example is &#039;&#039;root&#039;&#039; but if you created a new user, its username can be used instead.&lt;br /&gt;
# Open {{path|/etc/inittab}} and replace &amp;quot;&#039;&#039;:respawn:/sbin/getty&#039;&#039;&amp;quot; with &amp;quot;&#039;&#039;:respawn:/sbin/getty -n -l /usr/sbin/autologin&#039;&#039;&amp;quot; for each TTY you want to enable autologin.&lt;br /&gt;
#: The getty&#039;s &#039;&#039;&#039;-n&#039;&#039;&#039; flag do not prompt the user for a login name&lt;br /&gt;
#: The getty&#039;s &#039;&#039;&#039;-l&#039;&#039;&#039; flag invokes a custom login instead of {{path|/bin/login}}; in our case it is set to invoke {{path|/usr/sbin/autologin}}&lt;br /&gt;
# To perform such a replacement on all TTYs, the following command can be used:{{Cmd|# sed -i &#039;s@:respawn:/sbin/getty@:respawn:/sbin/getty -n -l /usr/sbin/autologin@g&#039; /etc/inittab }}&lt;br /&gt;
#:  &amp;quot;&#039;&#039;&#039;@&#039;&#039;&#039;&amp;quot; is used as a delimiter&lt;br /&gt;
#:  The &#039;&#039;&#039;-i&#039;&#039;&#039; flag edits the file in-place&lt;br /&gt;
&lt;br /&gt;
== Use greetd ==&lt;br /&gt;
&lt;br /&gt;
The [[Greetd]] display manager has a text based greeter that can be configured to autologin.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [https://git.busybox.net/busybox/tree/init/init.c Busybox init source, substantial comments documenting /etc/inittab are at the bottom]&lt;br /&gt;
* [http://littlesvr.ca/linux-stuff/articles/autologinconsole/autologinconsole.php Linux-Stuff: Log in automatically to a console when Linux boots]&lt;br /&gt;
* [https://wiki.gumstix.com/index.php/AutoLogin AutoLogin - Gumstix User Wiki]&lt;br /&gt;
* [https://busybox.net/downloads/BusyBox.html#getty Busybox getty arguments]&lt;br /&gt;
* [https://github.com/util-linux/util-linux/blob/master/term-utils/agetty.8.adoc agetty(8) Manual Page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Display Managers]]&lt;br /&gt;
[[Category:Desktop]]&lt;/div&gt;</summary>
		<author><name>Groin1655</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Groin1655&amp;diff=29233</id>
		<title>User:Groin1655</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Groin1655&amp;diff=29233"/>
		<updated>2025-03-11T21:08:17Z</updated>

		<summary type="html">&lt;p&gt;Groin1655: Created page with &amp;quot;Hello&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello&lt;/div&gt;</summary>
		<author><name>Groin1655</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:TTY_Autologin&amp;diff=29202</id>
		<title>Talk:TTY Autologin</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:TTY_Autologin&amp;diff=29202"/>
		<updated>2025-03-07T01:21:08Z</updated>

		<summary type="html">&lt;p&gt;Groin1655: /* By using agetty (CLI Proxmox) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Isn&#039;t this just reinventing the wheel? ==&lt;br /&gt;
&amp;lt;s&amp;gt;Instead of going through the trouble of compiling something, wouldn&#039;t it be much easier to &amp;lt;code&amp;gt;apk add {{pkg|agetty}}&amp;lt;/code&amp;gt; (from main) and use the {{key|-a}} (&amp;lt;small&amp;gt;{{key|--autologin}}&amp;lt;/small&amp;gt;) option?&amp;lt;/s&amp;gt; &amp;amp;ndash;zcrayfish ([[User talk:zcrayfish|talk]]•[[Special:Contributions/zcrayfish|contribs]]•[[Special:EmailUser/zcrayfish|send email]]) 02:13, 11 September 2023 (UTC)&lt;br /&gt;
:Disregard because I edited the article to have both. (the agetty option was needed for the non-edge users in any case) &amp;amp;ndash;[[User:zcrayfish|zcrayfish]] &amp;lt;small&amp;gt;([[User talk:zcrayfish|talk]]•[[Special:Contributions/zcrayfish|contribs]]•[[Special:EmailUser/zcrayfish|send email]])&amp;lt;/small&amp;gt; 08:32, 12 September 2023 (UTC)&lt;br /&gt;
::tcc is not a mandatory package, it is just a C compiler, I initially choose it because it is small (~1Mb) in contrast to gcc (&amp;gt;100Mb), but if the issue is that it is on edge, then it is enough to use gcc which is in main, simple as that. Also agetty is times larger then a mere system call. &amp;amp;ndash;[[User:MarcoDG |MarcoDG]] 08:39, 15 September 2023 (CET)&lt;br /&gt;
&lt;br /&gt;
== By using agetty (CLI Proxmox) ==&lt;br /&gt;
&lt;br /&gt;
Hi [[User:Groin1655]],  I have never used Proxmox, so need your help. Can you please clarify if the changes suggested by you has to be done in the Proxmox guest or the host alpine OS. btw:are you running diskless either in host or guest? because diskless tool [[Alpine local backup|lbu]] &#039;&#039;&#039;does not&#039;&#039;&#039; track files outside /etc drive. The previous instructions were there for a long time and i&#039;m curious about your use case. &lt;br /&gt;
Please add necessary qualifiers and if necessary we can create and move the content to Proxmox page and just put a pointer here, so that other users are not affected.   -[[User:Prabuanand|Prabuanand]] ([[User talk:Prabuanand|talk]]) 04:31, 5 March 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi [[User:Prabuanand|Prabuanand]], I am building a LXC container based on Alpine linux and wanted the have it perform an autologin on startup. The changes were done in the disk-based guest. The host OS is debian 12. I will change the procedure as needed, when I get it working. Currently after each reboot the /etc/inittab is getting modified and my changes to the line &amp;quot;tty1::respawn:/sbin/getty 38400 tty1&amp;quot; are being restored. The comments are not. So there must be a script somehere. I dont know what it is rewriting the lines.  --[[User:Groin1655|Groin1655]] ([[User talk:Groin1655|talk]]) 01:21, 7 March 2025 (UTC)&lt;/div&gt;</summary>
		<author><name>Groin1655</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=TTY_Autologin&amp;diff=29196</id>
		<title>TTY Autologin</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=TTY_Autologin&amp;diff=29196"/>
		<updated>2025-03-05T01:11:24Z</updated>

		<summary type="html">&lt;p&gt;Groin1655: /* By using agetty */  The inittab was overwriten on each reboot in my case&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents how to setup autologin to tty. Once configured, when computer is powered on, you will be logged in automatically without typing password. Note that, if someone else starts up your computer, they will be able to access your account and your personal data. &lt;br /&gt;
&lt;br /&gt;
== By using agetty ==&lt;br /&gt;
&lt;br /&gt;
Install {{pkg|agetty}}: {{cmd|# apk add agetty}}&lt;br /&gt;
&lt;br /&gt;
Edit {{path|/etc/inittab}} to use agetty&amp;lt;br&amp;gt;&lt;br /&gt;
Example for the virtual terminal tty1:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;tty1::respawn:/sbin/agetty --autologin root tty1 linux&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example inittab entry for a serial terminal on ttys01:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;ttyS0::respawn:/sbin/agetty --autologin root ttyS0 vt100&amp;lt;/code&amp;gt;&lt;br /&gt;
{{tip|You can change the `tty1` or `ttyS0` to a different serial port or virtual terminal as you please. `root` can be changed to a different user as well. Finally the terminal type (`linux` and `vt100` in our examples) can be changed to a wide variety of serial terminals.}}&lt;br /&gt;
&lt;br /&gt;
== By using agetty (CLI Proxmox) ==&lt;br /&gt;
&lt;br /&gt;
Install {{pkg|agetty}}: {{cmd|# apk add agetty}}&lt;br /&gt;
&lt;br /&gt;
Create new file {{path|/etc/init.d/autologin}}&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/sbin/openrc-run&lt;br /&gt;
&lt;br /&gt;
name=&amp;quot;autologin&amp;quot;&lt;br /&gt;
description=&amp;quot;Enable autologin on tty1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
command=&amp;quot;/sbin/agetty&amp;quot;&lt;br /&gt;
command_args=&amp;quot;--autologin root --noclear 38400 tty1&amp;quot;&lt;br /&gt;
pidfile=&amp;quot;/run/${name}.pid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make it executable &lt;br /&gt;
{{cmd|# chmod +x /etc/init.d/autologin}}&lt;br /&gt;
&lt;br /&gt;
Create the autologin service&lt;br /&gt;
{{cmd| #rc-update add autologin default}}&lt;br /&gt;
&lt;br /&gt;
You can now reboot and login directly to root.&lt;br /&gt;
&lt;br /&gt;
ps: The {{path|/etc/inittab}} modification did not work for me as the file was overwriten on each boot.&lt;br /&gt;
&lt;br /&gt;
== By making your own autologin wrapper ==&lt;br /&gt;
&lt;br /&gt;
Create a script, called autologin, around {{path|/bin/login}} and moving it in {{path|/usr/sbin/}} and editing {{path|/etc/inittab}} to specify the use of {{path|/usr/sbin/autologin}} instead of {{path|/bin/login}}.&lt;br /&gt;
&lt;br /&gt;
# Create and edit the autologin wrapper script {{path|/usr/sbin/autologin}} as follows:{{cat|/usr/sbin/autologin|#!/bin/sh&lt;br /&gt;
exec login -f root}}&lt;br /&gt;
# Remember to make the scripts executable: {{cmd|# chmod +x /usr/sbin/autologin}}&lt;br /&gt;
# The script executes the &#039;&#039;login&#039;&#039; binary (part of busybox) which will be searched in $PATH. As parameters are passed:&lt;br /&gt;
#:   &#039;&#039;&#039;-f&#039;&#039;&#039;  flag which stands for &amp;quot;Do not authenticate (user already authenticated)&amp;quot;&lt;br /&gt;
#:   &#039;&#039;username&#039;&#039; in this example is &#039;&#039;root&#039;&#039; but if you created a new user, its username can be used instead.&lt;br /&gt;
# Open {{path|/etc/inittab}} and replace &amp;quot;&#039;&#039;:respawn:/sbin/getty&#039;&#039;&amp;quot; with &amp;quot;&#039;&#039;:respawn:/sbin/getty -n -l /usr/sbin/autologin&#039;&#039;&amp;quot; for each TTY you want to enable autologin.&lt;br /&gt;
#: The getty&#039;s &#039;&#039;&#039;-n&#039;&#039;&#039; flag do not prompt the user for a login name&lt;br /&gt;
#: The getty&#039;s &#039;&#039;&#039;-l&#039;&#039;&#039; flag invokes a custom login instead of {{path|/bin/login}}; in our case it is set to invoke {{path|/usr/sbin/autologin}}&lt;br /&gt;
# To perform such a replacement on all TTYs, the following command can be used:{{Cmd|# sed -i &#039;s@:respawn:/sbin/getty@:respawn:/sbin/getty -n -l /usr/sbin/autologin@g&#039; /etc/inittab }}&lt;br /&gt;
#:  &amp;quot;&#039;&#039;&#039;@&#039;&#039;&#039;&amp;quot; is used as a delimiter&lt;br /&gt;
#:  The &#039;&#039;&#039;-i&#039;&#039;&#039; flag edits the file in-place&lt;br /&gt;
&lt;br /&gt;
== Use greetd ==&lt;br /&gt;
&lt;br /&gt;
The [[Greetd]] display manager has a text based greeter that can be configured to autologin.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [https://git.busybox.net/busybox/tree/init/init.c Busybox init source, substantial comments documenting /etc/inittab are at the bottom]&lt;br /&gt;
* [http://littlesvr.ca/linux-stuff/articles/autologinconsole/autologinconsole.php Linux-Stuff: Log in automatically to a console when Linux boots]&lt;br /&gt;
* [https://wiki.gumstix.com/index.php/AutoLogin AutoLogin - Gumstix User Wiki]&lt;br /&gt;
* [https://busybox.net/downloads/BusyBox.html#getty Busybox getty arguments]&lt;br /&gt;
* [https://github.com/util-linux/util-linux/blob/master/term-utils/agetty.8.adoc agetty(8) Manual Page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Display Managers]]&lt;br /&gt;
[[Category:Desktop]]&lt;/div&gt;</summary>
		<author><name>Groin1655</name></author>
	</entry>
</feed>