* agetty and special chars @ and #
@ 2012-11-07 16:58 Karel Zak
2012-11-12 10:04 ` Dr. Werner Fink
0 siblings, 1 reply; 10+ messages in thread
From: Karel Zak @ 2012-11-07 16:58 UTC (permalink / raw)
To: Dr. Werner Fink, util-linux
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.
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
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: agetty and special chars @ and # 2012-11-07 16:58 agetty and special chars @ and # Karel Zak @ 2012-11-12 10:04 ` Dr. Werner Fink 2012-11-12 13:29 ` Karel Zak 0 siblings, 1 reply; 10+ messages in thread From: Dr. Werner Fink @ 2012-11-12 10:04 UTC (permalink / raw) To: util-linux On Wed, Nov 07, 2012 at 05:58:59PM +0100, Karel Zak wrote: > > 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. > > 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 -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: agetty and special chars @ and # 2012-11-12 10:04 ` Dr. Werner Fink @ 2012-11-12 13:29 ` Karel Zak 2012-11-14 14:27 ` Dr. Werner Fink 0 siblings, 1 reply; 10+ messages in thread From: Karel Zak @ 2012-11-12 13:29 UTC (permalink / raw) To: util-linux; +Cc: Dr. Werner Fink On Mon, Nov 12, 2012 at 11:04:11AM +0100, Dr. Werner Fink wrote: > On Wed, Nov 07, 2012 at 05:58:59PM +0100, Karel Zak wrote: > > > > 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. > > > > 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. 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 > > > Werner > > http://www.linusakesson.net/programming/tty/ > http://digilander.libero.it/robang/rubrica/serial.htm > > -- > "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 majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Karel Zak <kzak@redhat.com> http://karelzak.blogspot.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: agetty and special chars @ and # 2012-11-12 13:29 ` Karel Zak @ 2012-11-14 14:27 ` Dr. Werner Fink 2012-11-16 10:14 ` Karel Zak 0 siblings, 1 reply; 10+ messages in thread From: Dr. Werner Fink @ 2012-11-14 14:27 UTC (permalink / raw) To: Karel Zak; +Cc: util-linux On Mon, Nov 12, 2012 at 02:29:26PM +0100, Karel Zak wrote: > On Mon, Nov 12, 2012 at 11:04:11AM +0100, Dr. Werner Fink wrote: > > On Wed, Nov 07, 2012 at 05:58:59PM +0100, Karel Zak wrote: > > > > > > 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. > > > > > > 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. > > 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). 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 -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: agetty and special chars @ and # 2012-11-14 14:27 ` Dr. Werner Fink @ 2012-11-16 10:14 ` Karel Zak 2012-11-16 12:47 ` Lennart Poettering 0 siblings, 1 reply; 10+ messages in thread From: Karel Zak @ 2012-11-16 10:14 UTC (permalink / raw) To: util-linux; +Cc: Lennart Poettering On Wed, Nov 14, 2012 at 03:27:20PM +0100, Dr. Werner Fink wrote: > 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 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? -- Karel Zak <kzak@redhat.com> http://karelzak.blogspot.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: agetty and special chars @ and # 2012-11-16 10:14 ` Karel Zak @ 2012-11-16 12:47 ` Lennart Poettering 2012-11-16 13:05 ` Karel Zak 0 siblings, 1 reply; 10+ messages in thread From: Lennart Poettering @ 2012-11-16 12:47 UTC (permalink / raw) To: Karel Zak; +Cc: util-linux On Fri, 16.11.12 11:14, Karel Zak (kzak@redhat.com) wrote: > > On Wed, Nov 14, 2012 at 03:27:20PM +0100, Dr. Werner Fink wrote: > > 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 > > 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/getty@.service to /etc/systemd/system/getty@ttyS0.service 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 -- Lennart Poettering - Red Hat, Inc. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: agetty and special chars @ and # 2012-11-16 12:47 ` Lennart Poettering @ 2012-11-16 13:05 ` Karel Zak 2012-11-20 0:47 ` Lennart Poettering 0 siblings, 1 reply; 10+ messages in thread From: Karel Zak @ 2012-11-16 13:05 UTC (permalink / raw) To: Lennart Poettering; +Cc: util-linux On Fri, Nov 16, 2012 at 01:47:29PM +0100, Lennart Poettering wrote: > On Fri, 16.11.12 11:14, Karel Zak (kzak@redhat.com) wrote: > > > > > On Wed, Nov 14, 2012 at 03:27:20PM +0100, Dr. Werner Fink wrote: > > > 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 > > > > 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/getty@.service to > /etc/systemd/system/getty@ttyS0.service 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 -- Karel Zak <kzak@redhat.com> http://karelzak.blogspot.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: agetty and special chars @ and # 2012-11-16 13:05 ` Karel Zak @ 2012-11-20 0:47 ` Lennart Poettering 2012-11-20 9:26 ` [util-linux] " Dr. Werner Fink 0 siblings, 1 reply; 10+ messages in thread From: Lennart Poettering @ 2012-11-20 0:47 UTC (permalink / raw) To: Karel Zak; +Cc: util-linux On Fri, 16.11.12 14:05, Karel Zak (kzak@redhat.com) wrote: > > On Fri, Nov 16, 2012 at 01:47:29PM +0100, Lennart Poettering wrote: > > On Fri, 16.11.12 11:14, Karel Zak (kzak@redhat.com) wrote: > > > > > > > > On Wed, Nov 14, 2012 at 03:27:20PM +0100, Dr. Werner Fink wrote: > > > > 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 > > > > > > 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/getty@.service to > > /etc/systemd/system/getty@ttyS0.service 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 -- Lennart Poettering - Red Hat, Inc. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [util-linux] agetty and special chars @ and # 2012-11-20 0:47 ` Lennart Poettering @ 2012-11-20 9:26 ` Dr. Werner Fink 2012-11-20 16:59 ` Lennart Poettering 0 siblings, 1 reply; 10+ messages in thread From: Dr. Werner Fink @ 2012-11-20 9:26 UTC (permalink / raw) To: Lennart Poettering; +Cc: util-linux On Tue, Nov 20, 2012 at 01:47:23AM +0100, Lennart Poettering wrote: > On Fri, 16.11.12 14:05, Karel Zak (kzak@redhat.com) wrote: > > > > > On Fri, Nov 16, 2012 at 01:47:29PM +0100, Lennart Poettering wrote: > > > On Fri, 16.11.12 11:14, Karel Zak (kzak@redhat.com) wrote: > > > > > > > > > > > On Wed, Nov 14, 2012 at 03:27:20PM +0100, Dr. Werner Fink wrote: > > > > > 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 > > > > > > > > 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/getty@.service to > > > /etc/systemd/system/getty@ttyS0.service 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 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 getty@.service nor serial-getty@.service 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 getty@.service and serial-getty@.service them self. In other words: usability by striking simplicity :) Werner -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [util-linux] agetty and special chars @ and # 2012-11-20 9:26 ` [util-linux] " Dr. Werner Fink @ 2012-11-20 16:59 ` Lennart Poettering 0 siblings, 0 replies; 10+ messages in thread From: Lennart Poettering @ 2012-11-20 16:59 UTC (permalink / raw) To: util-linux On Tue, 20.11.12 10:26, Dr. Werner Fink (werner@suse.de) wrote: > > 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 getty@.service nor serial-getty@.service 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. 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. > 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 getty@.service and serial-getty@.service 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 -- Lennart Poettering - Red Hat, Inc. ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-11-20 16:59 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-11-07 16:58 agetty and special chars @ and # Karel Zak 2012-11-12 10:04 ` Dr. Werner Fink 2012-11-12 13:29 ` Karel Zak 2012-11-14 14:27 ` Dr. Werner Fink 2012-11-16 10:14 ` Karel Zak 2012-11-16 12:47 ` Lennart Poettering 2012-11-16 13:05 ` Karel Zak 2012-11-20 0:47 ` Lennart Poettering 2012-11-20 9:26 ` [util-linux] " Dr. Werner Fink 2012-11-20 16:59 ` Lennart Poettering
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).