Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
52 views
How do I adapt the /etc/issue file depending on how the terminal is attached: serial line vs. network?
I've got a machine running OpenSuSE Leap 15.5, which can be remote-controlled both by usign a local serial line (RS232), and via network (SSH). Now I've got an `/etc/issue` file auto-generated by `/usr/sbin/issue-generator` upon every system startup. Here is the content of `/etc/issue`: ``` Welcome...
I've got a machine running OpenSuSE Leap 15.5, which can be remote-controlled both by usign a local serial line (RS232), and via network (SSH). Now I've got an /etc/issue file auto-generated by /usr/sbin/issue-generator upon every system startup. Here is the content of /etc/issue:
Welcome to \S - Kernel \r (\l).

eth0: \4{eth0} \6{eth0}
It's obvious that the eth0 line doesn't make very much sense when accessing the machine via serial line. Here I would rather expect something like this: ttyS5 vt340 115200 8N1 And this is what /etc/sysconfig/issue-generator looks like (comments omitted):
NETWORK_INTERFACE_REGEX="^[be]"
This makes it necessary for the getty process in use (I'm using agetty for the serial line) to find out which interface the terminal is attached to and to adapt the line stated above accordingly, but how? This is the serial getty service file (comments omitted):
[Unit]
Description=Serial Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
Documentation=http://0pointer.de/blog/projects/serial-console.html 
BindsTo=dev-%i.device
After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target
After=rc-local.service

Before=getty.target
IgnoreOnIsolate=yes

Conflicts=rescue.service
Before=rescue.service

[Service]
ExecStart=-/sbin/agetty -L 115200 %I $TERM
Type=idle
Restart=always
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
IgnoreSIGPIPE=no
SendSIGHUP=yes

[Install]
WantedBy=getty.target
Neppomuk (364 rep)
Jun 29, 2025, 01:47 PM • Last activity: Jun 29, 2025, 03:40 PM
15 votes
2 answers
1388 views
VT320 over ttyUSB0 crashes when encountering emoji
For better or worse, I hooked up my VT320 to my Linux machine. I'm trying to run some software on, but the serial connection seems to end up in a crashed state whenever somes emojis are rendered. [![Picture of VT320 in crashed state][1]][1] Not sure if it's important, but in this case it was the &#1...
For better or worse, I hooked up my VT320 to my Linux machine. I'm trying to run some software on, but the serial connection seems to end up in a crashed state whenever somes emojis are rendered. Picture of VT320 in crashed state Not sure if it's important, but in this case it was the 🎲 (die) emoji. Instead, I get a mirrored question mark and the terminal doesn't render anything else. I know emojis would never work. I'll settle for an incorrect character or none at all, but I would like to know if it's possible to avoid freezing the connection. In case it's relevant, this is how agetty is configured in /lib/systemd/system/serial-getty@.service. I opted for the VT220, as it's the closest to what I have.
ExecStart=-/sbin/agetty -h -L 19200 %I vt220
Output of stty -a:
speed 19200 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = ;
eol2 = ; swtch = ; start = ^Q; stop = ^S; susp = ;
rprnt = ; werase = ; lnext = ; discard = ;
min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon -iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl echoke -flusho -extproc
Evert (262 rep)
Feb 16, 2025, 02:17 AM • Last activity: Feb 18, 2025, 02:27 PM
2 votes
2 answers
1962 views
No login prompt from Getty over serial console
My Ubuntu 20.04 system has a serial port over which I would like to provide console access. I can confirm that I can communicate over the serial port with sudo picocom -b 115200 /dev/ttyS5 I start the Getty instance with sudo systemctl start serial-getty@ttyS5 which starts the command /sbin/agetty -...
My Ubuntu 20.04 system has a serial port over which I would like to provide console access. I can confirm that I can communicate over the serial port with sudo picocom -b 115200 /dev/ttyS5 I start the Getty instance with sudo systemctl start serial-getty@ttyS5 which starts the command /sbin/agetty -o '-p -- \u' --keep-baud 115200,38400,9600 ttyS5 vt220 However, no login prompt appears on the remote system.
rgov (253 rep)
Mar 28, 2022, 05:07 PM • Last activity: Jun 15, 2024, 04:00 AM
1 votes
1 answers
91 views
Serial console changes parameters when SUDOing
I'm working on a project where I need to connect a very old serial terminal to a linux device (a Raspberry). The terminal uses 4800bps, 7 data bits and even parity. I have reconfigured the kernel command line to use these parameters and also the serial-getty service and I get a nice connection where...
I'm working on a project where I need to connect a very old serial terminal to a linux device (a Raspberry). The terminal uses 4800bps, 7 data bits and even parity. I have reconfigured the kernel command line to use these parameters and also the serial-getty service and I get a nice connection where I can login and use the system. The problem comes whenever I use a command with sudo, all the data received by the terminal is garbage, it seems that the system is using different serial parameters when I use sudo, after the command ends the parameters seem to be restored again and continues working as expected... How can I prevent these changes?
Gusman (111 rep)
May 25, 2024, 11:11 PM • Last activity: May 26, 2024, 10:23 AM
5 votes
1 answers
728 views
job control doesn't work when I try to set up getty over serial
I am trying to set up getty to log in over serial (mainly as an experiment). With almost any configuration, the same thing happens. If my default shell is `bash`, I get this message after I log in: ``` -bash: cannot set terminal process group (15297): Inappropriate ioctl for device -bash: no job con...
I am trying to set up getty to log in over serial (mainly as an experiment). With almost any configuration, the same thing happens. If my default shell is bash, I get this message after I log in:
-bash: cannot set terminal process group (15297): Inappropriate ioctl for device
-bash: no job control in this shell
and then to prove that it doesn't work, I can't use ctrl+C to stop programs:
$ sleep 30
^C
and it doesn't seem to send the signal. These are the configurations I have tried: I have tried both of these commands
# copied from raspberry pi:
sudo /sbin/agetty --keep-baud 115200,38400,9600 ttyUSB0 vt220
# something else I read somewhere
sudo getty -L ttyUSB0 9600 vt100
# (I know I'm mixing and matching a lot of differences but the result is the same)
I have tried both screen and picocom as a client. I have tried using a rasberry pi as a server, and two different ubuntu laptops. I have tried two FTDIs, two RS-485 usb adapters, and a built in RS232 on the getty side with a USB RS232 on the client side. I have also tried changing my default shell to sh and dash. I don't get the message, but ctrl+C still doesn't work as expected The funny thing is - when raspberry pi's automatically configure /dev/ttyAMA0, and it uses exactly the getty command that I have put, job control works! And the terminal settings are almost identical. (except for -iutf8 actually) here are the terminal settings with the FTDI connection, and picocom running:
$ stty -a -F /dev/ttyUSB0
speed 9600 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D;
eol = ; eol2 = ; swtch = ; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ; discard = ; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal
-crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr
-icrnl ixon ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0
tab0 bs0 vt0 ff0
isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase
-tostop -echoprt echoctl echoke -flusho -extproc
$ stty -a -F /dev/ttyUSB1
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D;
eol = ; eol2 = ; swtch = ; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal
-crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr
-icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0
cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase
-tostop -echoprt echoctl echoke -flusho -extproc
What am I doing wrong? And why does it work with the built in configuration for the built in serial port on the raspberry pi?
Alex028502 (643 rep)
Mar 10, 2024, 07:25 PM • Last activity: Mar 11, 2024, 08:03 AM
1 votes
1 answers
118 views
Let agetty (or other) switch off the laptop screen after a short while on non-UI linux
Using an older laptop as a small server with no graphical UI/login, it has an `agetty` running on the system console, i.e. the laptop screen. Since I login almost always via network, there is no point having the screen switched on. It should be off until I hit some key. Can this be done? The followi...
Using an older laptop as a small server with no graphical UI/login, it has an agetty running on the system console, i.e. the laptop screen. Since I login almost always via network, there is no point having the screen switched on. It should be off until I hit some key. Can this be done? The following are non-options: - not running agetty, because I want to keep it as a fallback in case I cannot log in over the net anymore. - setterm cannot be used, because I would have to log in first - setterm --blank says "terminal xterm-256color does not support --blank" :-/ - vbetool linked in some answer wrecks the display to show garbage and cannot switch it on any more on my laptop. This answer says the console should only be started on demand, but clearly when logging in via ssh I see two agetty processes and the laptop screen is on showing the login prompt.
Harald (1030 rep)
Jan 14, 2023, 02:38 PM • Last activity: Nov 11, 2023, 09:25 AM
3 votes
1 answers
191 views
"sudo" prompts for password in terminal that has started "agetty ttyS0 9600" instead of the "serial" terminal
Broader context, I'm using QEMU+KVM to virtualize an ubuntu machine like this: ``` qemu-system-x86_64 \ -enable-kvm \ -m 2048 \ -nic none \ -vnc :5 \ -hda test-vm.raw \ -device vfio-pci,host=01:00.0 \ -serial unix:/tmp/console.sock,server,nowait ``` I'm using `/tmp/console.sock` to login into the vi...
Broader context, I'm using QEMU+KVM to virtualize an ubuntu machine like this:
qemu-system-x86_64 \
    -enable-kvm \
    -m 2048 \
    -nic none \
    -vnc :5 \
    -hda test-vm.raw \
    -device vfio-pci,host=01:00.0 \
    -serial unix:/tmp/console.sock,server,nowait
I'm using /tmp/console.sock to login into the virtual machine via "serial": socat stdin,raw,echo=0,escape=0x11 "unix-connect:/tmp/console.sock" This works without any major problems. However, when I'm entering sudo su the prompt for the password appears on the terminal that has started the agetty process (not the serial console). I know that starting agetty from a terminal isn't how you would start it normally. However, I'm very curious as to how this happens and how I can start agetty from the terminal without it having _any_ connection (sudo asking for the password on the terminal that has started agetty leads me to believe that there _is_ some connection) to the terminal that has started it. I already tried:
$ nohup agetty ttyS0 9600 &
$ disown
Without success. Would love to know the underlying mechanic that is at play here and how I can possibly remedy the issue*. *As said, I know that starting agetty from a normal terminal isn't how you would use the program. I'm still interested in how this happens and how you could prevent agetty from acting this way.
Marco (158 rep)
Oct 30, 2023, 06:51 PM • Last activity: Oct 31, 2023, 12:59 PM
1 votes
1 answers
3681 views
How to enable automatic login in alpine linux for root
I am trying to set up an alpine linux machine that needs to run an user program at the startup. I did not add any user except for root. After searching for solution of how to enable automatic login i have found instructions that said i need to use agetty. In order: 1. `apk add util-linux` to add age...
I am trying to set up an alpine linux machine that needs to run an user program at the startup. I did not add any user except for root. After searching for solution of how to enable automatic login i have found instructions that said i need to use agetty. In order: 1. apk add util-linux to add agetty. 2. cd /etc/init.d && ln -s agetty agetty.tty1 to add agetty service for the terminal. 3. cd /etc/conf.d && cp agetty agetty.tty1 to add configuration. 4. nano agetty.tty1 or use other editor to add "--autologin $USER --noclear" to agetty options 5. rc-update add agetty.tty1 to ensure launch at start. One thing that bothered me was the fact instruction told about turning off previous agetty service before adding new, changed one - and there was no agetty service enabled. However, things went wrong: during machine start i could see output of the automatic login before several services (chrony and some other) were started, and then i got another login prompt that did not work anymore. it seemed as there were bno two logins/terminals and system became unworkable. What was my error and how can i fix this?
Srv19 (105 rep)
Jul 10, 2023, 08:18 AM • Last activity: Jul 10, 2023, 12:45 PM
0 votes
1 answers
217 views
Does linux/systemd/agetty support doubble ended serial-getty consoles?
My apologies if this is a ultra basic question: Does linux / systemd / agetty support double ended serial-getty consoles? For example I have two remote servers A and B, they are running a recent ubuntu with systemd, agetty and screen installed. There is a null modem cable installed bewteen the serve...
My apologies if this is a ultra basic question: Does linux / systemd / agetty support double ended serial-getty consoles? For example I have two remote servers A and B, they are running a recent ubuntu with systemd, agetty and screen installed. There is a null modem cable installed bewteen the servers and it appears on /dev/ttyS0 on both. From Server B I can use screen to get a login prompt (agetty) on server A. From that prompt I can reboot the server A, grub comes up I can make choices in grub, boot Linux, I see the boot messages, then a successful login prompt etc all over a serial link from B. Is it possible to do the reverse with the same serial port/link ? Can I use screen to login to server B from A over the same /dev/ttyS0? Can server B also have agetty listen on /dev/ttyS0 when it is not in use by screen? And if not and I need a second serial port/cable to get from A -> B, is that a hardware limitation of UART or a software limitation of agetty or systemd ? And if its a systemd issue it this possible in a non-systemd Linux say Gentoo? Thank you in advance.
turtle (196 rep)
Jun 8, 2023, 07:47 PM • Last activity: Jun 8, 2023, 08:05 PM
1 votes
2 answers
171 views
Which process is responsible for mapping Ctr+C to intr signal in systemd+agetty+login+bash?
I am trying to read source code to understand which process is reponsible for these mapping, but I can't still figure it out. Can anyone give me a hint about which code is relative to it ? source code: [agetty+login(util-linux project)][1], [systemd][2] [1]: https://github.com/util-linux/util-linux...
I am trying to read source code to understand which process is reponsible for these mapping, but I can't still figure it out. Can anyone give me a hint about which code is relative to it ? source code: agetty+login(util-linux project) , systemd
Li-Guangda (277 rep)
Feb 16, 2022, 04:54 AM • Last activity: Mar 10, 2022, 11:01 AM
1 votes
0 answers
317 views
Delay between username and password during tty login
Recently, I noticed that when using tty to login to my computer, there was a delay (around 20 seconds) between the time I enter my username and the time I'm getting asked for my password. Where can it come from ? I don't have such delay when using `su username` or `ssh username@localhost` and my pas...
Recently, I noticed that when using tty to login to my computer, there was a delay (around 20 seconds) between the time I enter my username and the time I'm getting asked for my password. Where can it come from ? I don't have such delay when using su username or ssh username@localhost and my password is asked right away. I'm using Arch Linux with kernel 5.14.16. **EDIT** Finally found the problem. There was a broken module in PAM (fingerprint auth) which needed to timeout before asking a password. Just disabled the module.
æyno (11 rep)
Nov 12, 2021, 05:19 PM • Last activity: Feb 8, 2022, 08:14 AM
3 votes
1 answers
2785 views
how to start a new terminal with agetty (not systemd)
For the sake of learning, I wanted to start a new terminal (let's say tty10) from the command prompt. I know I can just run `sudo systemctl start getty@tty10.service`, but I want to run it manually for now. I checked systemd service getty@ and it uses the following command line: /sbin/agetty -o '-p...
For the sake of learning, I wanted to start a new terminal (let's say tty10) from the command prompt. I know I can just run sudo systemctl start getty@tty10.service, but I want to run it manually for now. I checked systemd service getty@ and it uses the following command line: /sbin/agetty -o '-p -- \\u' --noclear %I $TERM So, trying to replicate that from a terminal (tty1) I ran this: sudo /sbin/agetty -o '-p -- ' --noclear tty10 linux It indeed started a new login prompt at terminal 10, I enter the username but it never prompts for a password. Besides, when I go back to terminal 1 I see it logged out. What am I doing wrong?
Adriano_epifas (216 rep)
Oct 2, 2019, 08:34 PM • Last activity: May 10, 2021, 04:35 PM
1 votes
1 answers
1434 views
How do I host a shell for a serial terminal?
I am building a dumb terminal with an arduino and I can now see the output of serial connections. How do I get a login/shell? I have tried `screen /dev/ttyACM0` and that lets me type on the host computer and see the results on the terminal screen, but no shell. Using screen's `:exec /bin/sh` command...
I am building a dumb terminal with an arduino and I can now see the output of serial connections. How do I get a login/shell? I have tried screen /dev/ttyACM0 and that lets me type on the host computer and see the results on the terminal screen, but no shell. Using screen's :exec /bin/sh command starts a shell on that controlling xterm window but no longer outputs to the serial line. various attempts with agetty -L /dev/ttyACM0 9600 just sit and hang for a minute then exits without ever having put anything on the screen. I have tried cu -l /dev/ttyACM0 -s 9600 and again it hangs with no screen interaction. I have connected minicom to echo keys onto the arduino similar to screen but could not figure out how to get a shell. To be clear I am trying to access my main computer via the arduino based terminal, and I can not find a way to make my main computer offer a shell session to the arduino over a USB serial connection.
Gregory (53 rep)
Feb 10, 2021, 03:00 AM • Last activity: Feb 10, 2021, 01:52 PM
0 votes
0 answers
61 views
systemd launch application on boot
All, I want to setup "Kiosk" mode on a real terminal with systemd. My initial approach was setup autologin with systemd and run the application from .bashrc. However the user is able to breakout to shell in this approach. What I would like to achieve is at bootup, the application auto-launches and i...
All, I want to setup "Kiosk" mode on a real terminal with systemd. My initial approach was setup autologin with systemd and run the application from .bashrc. However the user is able to breakout to shell in this approach. What I would like to achieve is at bootup, the application auto-launches and if it crashes respawns again. Any suggestion or pointers would be helpful.
zer0_0ne (1 rep)
Jul 1, 2020, 01:00 AM • Last activity: Jul 3, 2020, 04:33 AM
2 votes
3 answers
16112 views
Serial Getty error messages
I've a cloud server, with CentOS distribution, and an Apache instance to manage some web apps, like Wordpress or PrestaShop. I noticed that an error is reported in log files (`var/log/`). * In particular in `messages`: ``` May 30 11:54:41 xxx00962 systemd: Starting Serial Getty on ttyS0... May 30 11...
I've a cloud server, with CentOS distribution, and an Apache instance to manage some web apps, like Wordpress or PrestaShop. I noticed that an error is reported in log files (var/log/). * In particular in messages:
May 30 11:54:41 xxx00962 systemd: Starting Serial Getty on ttyS0...
     May 30 11:54:41 xxx00962 systemd: Started Serial Getty on ttyS0.
     May 30 11:54:51 xxx00962 systemd: serial-getty@ttyS0.service holdoff time over, scheduling restart.
     May 30 11:54:51 xxx00962 systemd: Stopping Serial Getty on ttyS0...
* and in secure:
May 30 15:51:30 xxx00962 agetty: /dev/ttyS0: not a character device
where xxx00962 is the (anonymized) hostname. I don't know what is getty for, but I'd like to solve the problem. Someone can help me and explain how getty works?
Round Robin (21 rep)
May 31, 2018, 09:09 AM • Last activity: Jun 24, 2020, 10:11 AM
0 votes
1 answers
1151 views
Dial-up vintage BBS access with agetty and a modem
I'm trying to setup a 80's service with Mystic BBS (that runs on telnet), including a dial-up access with a U.S. Robotics modem connected to the serial port of the server. I succeeded with mgetty: /sbin/mgetty -D -a -x6 /dev/ttyUSB0 This brings the Ubuntu login on the remote client, that I can repla...
I'm trying to setup a 80's service with Mystic BBS (that runs on telnet), including a dial-up access with a U.S. Robotics modem connected to the serial port of the server. I succeeded with mgetty: /sbin/mgetty -D -a -x6 /dev/ttyUSB0 This brings the Ubuntu login on the remote client, that I can replace with the output of telnet on localhost, configuring the process that is started upon the connection is established. **The problem is that mgetty requires the caller to enter an existing username on the server** before he can get to the welcome screen of Mystic. So, I switched to agetty: it has an auto-login feature that will skip the first step and it will directly bring the user to the telnet session using a conventional non-admin linux user. Then the user will login or register to the BBS service. Unfortunately, I can't get it to work: agetty -I 'ATE0Q1&D2&C1S0=1\015' ttyUSB0 vt100 With this command I can connect from the client, but nothing is shown on the terminal. The connection is stable, but nothing seems to be transmitted. If I send some strokes from the terminal and I monitor /dev/ttyUSB0 with *screen* on the server, I can see garbage characters that arrives, but everything is scrambled. Same thing if I send strokes from the *screen* session on the server, some "brick" characters are shown on the client terminal.
flip79 (101 rep)
Mar 21, 2020, 09:01 PM • Last activity: Mar 21, 2020, 09:20 PM
0 votes
1 answers
1015 views
Why does agetty fail to determine passwordon ubuntu 18.04.1?
I'm running a ubuntu server installation with a tty console, and sshd terminal logins. Both ssh keys and passwords work for authenticating over sshd. Lately, on the console, when I try to log in in text mode, I get a curious behavior: I enter my login name. It prompts for the password. However, it v...
I'm running a ubuntu server installation with a tty console, and sshd terminal logins. Both ssh keys and passwords work for authenticating over sshd. Lately, on the console, when I try to log in in text mode, I get a curious behavior: I enter my login name. It prompts for the password. However, it very quickly prints a newline, and whatever part of the password I hadn't typed already is echoed in cleartext to the console. Then, it prompts for login:, but quickly times out and prompts for login: again ... 5 times, until it goes back to clear the screen, and re-issue the agetty process. At that point it's "stable" and waits for a username again, but entering a username and pressing enter re-starts the "timeout and newline" behavior. The systemd log for getty@tty1 says the following: -- Unit getty@tty1.service has finished starting up. -- -- The start-up result is RESULT. Feb 08 12:12:47 xps15 login: pam_unix(login:auth): conversation failed Feb 08 12:12:47 xps15 login: pam_unix(login:auth): auth could not identify password for [jwatte] Feb 08 12:12:50 xps15 login: FAILED LOGIN (1) on '/dev/tty1' FOR 'jwatte', Authentication failure Feb 08 12:12:51 xps15 login: pam_securetty(login:auth): cannot determine username Feb 08 12:12:54 xps15 login: FAILED LOGIN (2) on '/dev/tty1' FOR 'UNKNOWN', Error in service module Feb 08 12:12:55 xps15 login: pam_securetty(login:auth): cannot determine username Feb 08 12:12:58 xps15 login: FAILED LOGIN (3) on '/dev/tty1' FOR 'UNKNOWN', Error in service module Feb 08 12:12:59 xps15 login: pam_securetty(login:auth): cannot determine username Feb 08 12:13:03 xps15 login: FAILED LOGIN (4) on '/dev/tty1' FOR 'UNKNOWN', Error in service module Feb 08 12:13:03 xps15 login: pam_securetty(login:auth): cannot determine username Feb 08 12:13:06 xps15 login: FAILED LOGIN (5) on '/dev/tty1' FOR 'UNKNOWN', Error in service module Feb 08 12:13:06 xps15 login: TOO MANY LOGIN TRIES (5) on '/dev/tty1' FOR 'UNKNOWN' Feb 08 12:13:06 xps15 login: pam_mail(login:session): cannot determine username Feb 08 12:13:06 xps15 login: pam_unix(login:session): close_session - error recovering username Feb 08 12:13:06 xps15 systemd: getty@tty1.service: Service has no hold-off time, scheduling restart. Feb 08 12:13:06 xps15 systemd: getty@tty1.service: Scheduled restart job, restart counter is at 1. -- Subject: Automatic restarting of a unit has been scheduled -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- Automatic restarting of the unit getty@tty1.service has been scheduled, as the result for -- the configured Restart= setting for the unit. I imagine the problem is the first two lines: pam_unix(login:auth): conversation failed pam_unix(login:auth): auth could not identify password for [jwatte] Why would this happen, and how can I best debug it?
Jon Watte (159 rep)
Feb 8, 2019, 08:19 PM • Last activity: Feb 11, 2019, 09:06 PM
1 votes
0 answers
2042 views
How can I set and export an environment variable in a systemd service?
after starting `agetty` on my Raspberry Pi in order to attach a VT420 terminal to it, I still have an issue: The shell language must be set to `en_US` and exported by hand right after logging in on the terminal (my version of Raspbian has German locale). Motivation: The terminal does not support UTF...
after starting agetty on my Raspberry Pi in order to attach a VT420 terminal to it, I still have an issue: The shell language must be set to en_US and exported by hand right after logging in on the terminal (my version of Raspbian has German locale). Motivation: The terminal does not support UTF-8 characters (and sometimes even stops working when receiving such a character), so I decided to fall back to English locale especially when logging in on the terminal. In all other cases (SSH etc.), UTF-8 is absolutely fine. I followed the suggestion set forth in question #455261 and added the following line to the systemd service file responsible for agetty: Environment="LANG=en_US" After a daemon reload and a restart of agetty, the login prompt is now in English, but when I start a program (say, df -h), its output is still in German and contains UTF-8 characters, causing the already-mentioned problems: pi@autoradio:/import/valen/autoradio $ df -h Dateisystem Grö …whereas the ö sequence should read as "ö". On the shell, I would say, export LANG=en_US, but I am not sure about how to export an env variable set in a systemd config. Does anybody know that? Thank you.
Neppomuk (364 rep)
Feb 9, 2019, 05:57 PM • Last activity: Feb 10, 2019, 02:59 PM
4 votes
0 answers
1626 views
Why do I not get a console with systemd?
I'm trying to get a login prompt on an embedded system using Debian and systemd. The system is connected via a physical serial console to a host PC. If I start the kernel with the cmdline parameters `console=ttyS5,115200 console=tty1 systemd.journald.forward_to_console=1` I do see all the kernel mes...
I'm trying to get a login prompt on an embedded system using Debian and systemd. The system is connected via a physical serial console to a host PC. If I start the kernel with the cmdline parameters console=ttyS5,115200 console=tty1 systemd.journald.forward_to_console=1 I do see all the kernel messages from /dev/kmsg and systemd logs, but I never see a login prompt. If I omit console=tty1 the kernel log is still beeing printed, but the systemd logs appear with a 30 seconds timeout for each line. What's the problem here? The same root file system works just fine for a similar embedded system.
JohnnyFromBF (3606 rep)
Dec 12, 2018, 01:17 PM • Last activity: Dec 12, 2018, 01:43 PM
1 votes
1 answers
3326 views
How to access agetty terminals (e.g. TTY2, 3, 4, etc.) from QEMU VM
In my QEMU virtual machine (started with `qemu-kvm -boot d arch-freebsd.img -m 4096`) I'd like to access an agetty terminal, which I'd normally access with Ctrl + Alt + F2 (or F3 if I need tty3, F4 if tty4, *etc.*), unfortunately pressing these keys just merely changes me to an agetty terminal on my...
In my QEMU virtual machine (started with qemu-kvm -boot d arch-freebsd.img -m 4096) I'd like to access an agetty terminal, which I'd normally access with Ctrl+Alt+F2 (or F3 if I need tty3, F4 if tty4, *etc.*), unfortunately pressing these keys just merely changes me to an agetty terminal on my host (as opposed to the guest system I'm trying to go to tty2 in). If this were a VirtualBox VM I'd press Ctrl+F2 (specifically the Ctrl in the centre of my keyboard, i.e. my right Ctrl key) to access tty2, but this doesn't work with QEMU. If you suggest I press Ctrl+Alt+G to get the VM to grab all my keyboard and mouse inputs, then pressing the keys to access the agetty terminals I've tried doing that and it doesn't work. EDIT: The proposed duplicate link doesn't list what solved my problem, pressing Alt+Fx. I've tried Ctrl+Alt+Fx that seems to be suggested there (although I'm having trouble getting my head around what it's about as what VNC is, is a mystery to me), that's kind of the problem here.
Josh Pinto (3533 rep)
Aug 13, 2018, 08:19 AM • Last activity: Nov 28, 2018, 08:27 AM
Showing page 1 of 20 total questions