agetty and special chars @ and #
Karel Zak
maintainerHi Werner,
agetty in get_logname() interprets '@' and '#' as a special chars (see man page or the code for more details).
The problem is that we already have crazy users who want to use AD (access domain) usernames in format user@domain on serial line or console.
Yeah, I know that char '@' is not between allowed username chars (POSIX 3.429), but do we really need to support the spacial interpretation of the @ and # chars?
I think it's old confusing legacy. Objections?
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 10 lines · Karel Zak
Hi Werner,
agetty in
get_logname()interprets '@' and '#' as a special chars (see man page or the code for more details).The problem is that we already have crazy users who want to use AD (access domain) usernames in format user@domain on serial line or console.
Quoted 5 lines
Yeah, I know that char '@' is not between allowed username chars (POSIX 3.429), but do we really need to support the spacial interpretation of the @ and # chars?
I think it's old confusing legacy. Objections?
Hmmm ... AFAICR the '@' symbols can be used to set the kill character and the '#' can be used to set the erase character. But for a virtual console terminal those characters those are normally not used.
Only connections at dialin as well connections over some serial lines with hardware/software line routers/terminal servers between this could be problem. On big irons such serial lines are used even in the present days.
Maybe it would be worth to introduce an further option to support access domains in user names ... or the other way around to support '@' and '#' as special characters used for software escapes on oldish connection lines.
Werner
http://www.linusakesson.net/programming/tty/
http://digilander.libero.it/robang/rubrica/serial.htm
Signature · 2 lines
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward BurrKarel Zak
maintainerQuoted 26 lines · Dr. Werner Fink
Quoted 10 lines · Karel Zak
Hi Werner,
agetty in
get_logname()interprets '@' and '#' as a special chars (see man page or the code for more details).The problem is that we already have crazy users who want to use AD (access domain) usernames in format user@domain on serial line or console.
Quoted 5 lines
Yeah, I know that char '@' is not between allowed username chars (POSIX 3.429), but do we really need to support the spacial interpretation of the @ and # chars?
I think it's old confusing legacy. Objections?
Hmmm ... AFAICR the '@' symbols can be used to set the kill character and the '#' can be used to set the erase character. But for a virtual console terminal those characters those are normally not used.
Only connections at dialin as well connections over some serial lines with hardware/software line routers/terminal servers between this could be problem. On big irons such serial lines are used even in the present days.
Quoted 4 lines
Maybe it would be worth to introduce an further option to support access domains in user names ... or the other way around to support '@' and '#' as special characters used for software escapes on oldish connection lines.
I thought about something like:
--erase-chars <string>
--kill-chars <string>
and if the string is empty then agetty is insensitive to the special chars. This should be a default for virtual console (or also for serial line?).
vice versa
agetty --erase-chars '#'
enables the support for the char.
IMHO this solution is easy to extend (you can use another chars) and provides full control of the feature (you can disable it at all).
Karel
Quoted 15 lines
Werner
http://www.linusakesson.net/programming/tty/
http://digilander.libero.it/robang/rubrica/serial.htmSignature · 6 lines
"Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 41 lines · Karel Zak
Quoted 26 lines · Dr. Werner Fink
Quoted 10 lines · Karel Zak
Hi Werner,
agetty in
get_logname()interprets '@' and '#' as a special chars (see man page or the code for more details).The problem is that we already have crazy users who want to use AD (access domain) usernames in format user@domain on serial line or console.
Quoted 5 lines
Yeah, I know that char '@' is not between allowed username chars (POSIX 3.429), but do we really need to support the spacial interpretation of the @ and # chars?
I think it's old confusing legacy. Objections?
Hmmm ... AFAICR the '@' symbols can be used to set the kill character and the '#' can be used to set the erase character. But for a virtual console terminal those characters those are normally not used.
Only connections at dialin as well connections over some serial lines with hardware/software line routers/terminal servers between this could be problem. On big irons such serial lines are used even in the present days.
Quoted 4 lines
Maybe it would be worth to introduce an further option to support access domains in user names ... or the other way around to support '@' and '#' as special characters used for software escapes on oldish connection lines.
I thought about something like:
--erase-chars <string>
--kill-chars <string>and if the string is empty then agetty is insensitive to the special chars. This should be a default for virtual console (or also for serial line?).
Quoted 8 lines
vice versa
agetty --erase-chars '#'enables the support for the char.
IMHO this solution is easy to extend (you can use another chars) and provides full control of the feature (you can disable it at all).
Indeed this is a good solution ... but in the case of systemd and its getty generator we may think about a /etc/agettytab with a similar syntax scheme as the old /etc/inittab to be able to provide agetty options based on the used tty line. Clearly this /etc/agettytab should be parsed by agetty and options for the specified tty are found:
1:tty1:--noclear %p 2:tty2:%p 3:tty3:%p 4:tty4:%p 5:tty5:%p 6:tty6:%p S0:ttyS0:--erase-chars # --kill-chars @ -mt 60 %p 9600,2400,1200 S1:ttyS0:-L 9600 %p 9600 vt102
... ??
Werner
Signature · 2 lines
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward BurrKarel Zak
maintainerQuoted 6 lines · Dr. Werner Fink
Indeed this is a good solution ... but in the case of systemd and its getty generator we may think about a
/etc/agettytabwith a similar syntax scheme as the old/etc/inittabto be able to provide agetty options based on the used tty line. Clearly this/etc/agettytabshould be parsed by agetty and options for the specified tty are found:
Quoted 8 lines
1:tty1:--noclear %p 2:tty2:%p 3:tty3:%p 4:tty4:%p 5:tty5:%p 6:tty6:%p S0:ttyS0:--erase-chars # --kill-chars @ -mt 60 %p 9600,2400,1200 S1:ttyS0:-L 9600 %p 9600 vt102
Hmm, I guess it's still possible to create tty line specific config file on systems with systemd. I'd like to avoid another place where will be configuration.
Lennart?
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 17 lines · Karel Zak
Quoted 6 lines · Dr. Werner Fink
Indeed this is a good solution ... but in the case of systemd and its getty generator we may think about a
/etc/agettytabwith a similar syntax scheme as the old/etc/inittabto be able to provide agetty options based on the used tty line. Clearly this/etc/agettytabshould be parsed by agetty and options for the specified tty are found:Quoted 8 lines
1:tty1:--noclear %p 2:tty2:%p 3:tty3:%p 4:tty4:%p 5:tty5:%p 6:tty6:%p S0:ttyS0:--erase-chars # --kill-chars @ -mt 60 %p 9600,2400,1200 S1:ttyS0:-L 9600 %p 9600 vt102
Quoted 3 lines
Hmm, I guess it's still possible to create tty line specific config file on systems with systemd. I'd like to avoid another place where will be configuration.
Please do not add such a configuration file.
In systemd, if people want to configure line-specific getty configuration they should just copy /usr/lib/systemd/system/[email protected] to /etc/systemd/system/[email protected] and edit it there. Since systemd will first look for instantiated unit files, and only then fall back to generic template this should do the right thing.
Lennart
Signature · 1 line
Lennart Poettering - Red Hat, Inc.
Karel Zak
maintainerQuoted 23 lines · Lennart Poettering
Quoted 17 lines · Karel Zak
Quoted 6 lines · Dr. Werner Fink
Indeed this is a good solution ... but in the case of systemd and its getty generator we may think about a
/etc/agettytabwith a similar syntax scheme as the old/etc/inittabto be able to provide agetty options based on the used tty line. Clearly this/etc/agettytabshould be parsed by agetty and options for the specified tty are found:Quoted 8 lines
1:tty1:--noclear %p 2:tty2:%p 3:tty3:%p 4:tty4:%p 5:tty5:%p 6:tty6:%p S0:ttyS0:--erase-chars # --kill-chars @ -mt 60 %p 9600,2400,1200 S1:ttyS0:-L 9600 %p 9600 vt102Quoted 3 lines
Hmm, I guess it's still possible to create tty line specific config file on systems with systemd. I'd like to avoid another place where will be configuration.
Quoted 8 lines
Please do not add such a configuration file.
In systemd, if people want to configure line-specific getty configuration they should just copy
/usr/lib/systemd/system/[email protected]to/etc/systemd/system/[email protected]and edit it there. Since systemd will first look for instantiated unit files, and only then fall back to generic template this should do the right thing.
It would be nice to make it more obvious in systemd.special man page.
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 27 lines · Karel Zak
Quoted 25 lines · Lennart Poettering
Quoted 17 lines · Karel Zak
Quoted 6 lines · Dr. Werner Fink
Indeed this is a good solution ... but in the case of systemd and its getty generator we may think about a
/etc/agettytabwith a similar syntax scheme as the old/etc/inittabto be able to provide agetty options based on the used tty line. Clearly this/etc/agettytabshould be parsed by agetty and options for the specified tty are found:Quoted 8 lines
1:tty1:--noclear %p 2:tty2:%p 3:tty3:%p 4:tty4:%p 5:tty5:%p 6:tty6:%p S0:ttyS0:--erase-chars # --kill-chars @ -mt 60 %p 9600,2400,1200 S1:ttyS0:-L 9600 %p 9600 vt102Quoted 3 lines
Hmm, I guess it's still possible to create tty line specific config file on systems with systemd. I'd like to avoid another place where will be configuration.
Please do not add such a configuration file.
Quoted 8 lines
Quoted 6 lines
In systemd, if people want to configure line-specific getty configuration they should just copy
/usr/lib/systemd/system/[email protected]to/etc/systemd/system/[email protected]and edit it there. Since systemd will first look for instantiated unit files, and only then fall back to generic template this should do the right thing.It would be nice to make it more obvious in systemd.special man page.
But the getty is actually not thaaaat special, it's actually just a unit like any other with no special semantics.
This general approach is actually well documented, for example most recently here:
http://0pointer.de/blog/projects/serial-console.html
Indirectly this all is also listed in the FAQ:
http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions
Lennart
Signature · 1 line
Lennart Poettering - Red Hat, Inc.
Quoted 41 lines · Lennart Poettering
Quoted 27 lines · Karel Zak
Quoted 25 lines · Lennart Poettering
Quoted 17 lines · Karel Zak
Quoted 6 lines · Dr. Werner Fink
Indeed this is a good solution ... but in the case of systemd and its getty generator we may think about a
/etc/agettytabwith a similar syntax scheme as the old/etc/inittabto be able to provide agetty options based on the used tty line. Clearly this/etc/agettytabshould be parsed by agetty and options for the specified tty are found:Quoted 8 lines
1:tty1:--noclear %p 2:tty2:%p 3:tty3:%p 4:tty4:%p 5:tty5:%p 6:tty6:%p S0:ttyS0:--erase-chars # --kill-chars @ -mt 60 %p 9600,2400,1200 S1:ttyS0:-L 9600 %p 9600 vt102Quoted 3 lines
Hmm, I guess it's still possible to create tty line specific config file on systems with systemd. I'd like to avoid another place where will be configuration.
Please do not add such a configuration file.
Quoted 8 lines
Quoted 6 lines
In systemd, if people want to configure line-specific getty configuration they should just copy
/usr/lib/systemd/system/[email protected]to/etc/systemd/system/[email protected]and edit it there. Since systemd will first look for instantiated unit files, and only then fall back to generic template this should do the right thing.It would be nice to make it more obvious in systemd.special man page.
But the getty is actually not thaaaat special, it's actually just a unit like any other with no special semantics.
Quoted 8 lines
This general approach is actually well documented, for example most recently here:
http://0pointer.de/blog/projects/serial-console.html
Indirectly this all is also listed in the FAQ:
http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions
Hi Lennart,
you and also I know how to do this, nevertheless just one remark: for most other users this is black magic (and most users are aliterate at the first moment). This because they are not aware how the systemd-getty-generator nor how the getty services have to be read. It is not at first glance obviously from [email protected] nor [email protected] how to get an other getty for a special serial console nor how to have a getty with a special option for e.g. for tty1.
The complexity level is to high due to the fact that there are to many locations and set screws to influence the numbers, devices, and options of the gettys.
If you like to avoid such simply approaches for agetty you may consider to help normal users which do not work daily as system administrators to help them by providing all infomations in a more comprehensible and user friendly form in *one* file. That could be that the getty-generator my use informations from [email protected] and [email protected] them self.
In other words: usability by striking simplicity :)
Werner
Signature · 2 lines
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward BurrQuoted 22 lines · Dr. Werner Fink
Quoted 11 lines
But the getty is actually not thaaaat special, it's actually just a unit like any other with no special semantics.
This general approach is actually well documented, for example most recently here:
http://0pointer.de/blog/projects/serial-console.html
Indirectly this all is also listed in the FAQ:
http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions
Hi Lennart,
you and also I know how to do this, nevertheless just one remark: for most other users this is black magic (and most users are aliterate at the first moment). This because they are not aware how the systemd-getty-generator nor how the getty services have to be read. It is not at first glance obviously from [email protected] nor [email protected] how to get an other getty for a special serial console nor how to have a getty with a special option for e.g. for tty1.
Quoted 3 lines
The complexity level is to high due to the fact that there are to many locations and set screws to influence the numbers, devices, and options of the gettys.
Well, I am not really sure I buy into the complexity thing so much. We use the same concepts for making changes to any service here, really. So if an admin grokked this once he should be able to apply this to any service he likes.
Quoted 7 lines
If you like to avoid such simply approaches for agetty you may consider to help normal users which do not work daily as system administrators to help them by providing all infomations in a more comprehensible and user friendly form in *one* file. That could be that the getty-generator my use informations from [email protected] and [email protected] them self.
In other words: usability by striking simplicity :)
I really don't agree that adding multiple levels of configuration really would be such a good idea. Adding redundancy by implementing several different ways to configure the same thing just adds confusion and complexity in my eyes.
Note that systemd-getty-generator actually comes with a man page. Of course, it's a problem to get people to actually find it, or even know about it.
I have now updated the Documentation= field of the getty services to point to the aforementioned blog story (this will then show up in systemctl status), and added similar links to all man pages in any way related to getty configuration. I think this is the best we can do:
keeping things uniform and not redundant, while beefing up docs and making them easier to find.
Hope this settles this,
Lennart
Signature · 1 line
Lennart Poettering - Red Hat, Inc.