Re: sysinst username length limit

2024-04-03 Thread Brett Lymn
On Wed, Apr 03, 2024 at 12:37:31PM +0200, ignat...@cs.uni-bonn.de wrote:
> 
> which is the only one supported by old YP code, in case you still
> have e.g. an sunos4 client in your network.
> 

If you have a sunos 4 nis client then it probably won't like the > 8
character usernames either.  I recall setting up a sunos 4 network in
the early 90's and there definitely was a hard limit of 8 characters
back then.  I don't know if it ever changed because we adopted a user
naming scheme that truncated the usernames to 8 characters until well
after nis was gone from the network.

-- 
Brett Lymn
--
Sent from my NetBSD device.

"We are were wolves",
"You mean werewolves?",
"No we were wolves, now we are something else entirely",
"Oh"


Re: sysinst username length limit

2024-04-03 Thread ignatios
Hi,

an addendum:

utmp and wtmp have a 8 character limit for the username.
utmpx and wtmpx, which I think we have since last century,*
have 32bit limit, so if your tools use the latter log files,
you're safe with 32 character username. If you exceed the limit,
last(8) etc. will only show the truncated name.

see utmpx(5)

-is

*) no - only since 
revision 1.1
date: 2002-02-22 21:09:01 +0100;  author: christos;  state: Exp;
A utmpx implementation.


Re: sysinst username length limit

2024-04-03 Thread ignatios
Hi,

On Wed, Apr 03, 2024 at 11:12:25AM +0200, Martin Husemann wrote:

> IIRC you could always use longer names if they were unique within the first
> 8 chars.

After failing to find hints in the YP code, other than variable
lengthes for both key and data, I decided to experiment:

Fortunately, I didn't fully remove the NIS configuration on the 
old server of my old workgroup when I switched NIS off, and switched
the server back on a while ago when I hunted for old hardware inventory
records.

theory.cs.uni-bonn.de# ypcat passwd | grep charl
charlotte:qXMQOBvuvVRgY:666:100::/home/theory/charlotte:/bin/tcsh
charlottf:DNe9Lzz0u8dMo:667:100::/home/theory/charlottf:/bin/tcsh

I also tested that the logins resulted in different accounts and
numerical uids.

What *is* silently truncated to first 8 chars is the password when
using the "DES" derived password hash,

(Experimentally verified with the above setup)

which is the only one supported by old YP code, in case you still
have e.g. an sunos4 client in your network.

-is


Re: sysinst username length limit

2024-04-03 Thread Hauke Fath
On Wed, 3 Apr 2024 11:12:25 +0200, Martin Husemann wrote:
> IIRC you could always use longer names if they were unique within the first
> 8 chars.

That's possible, and it is certainly true for the long account names 
here.
 
> Maybe it would be ok to ignore any such limits anyway since in setups where
> they apply you would either know about it (you are the admin) or would get
> your login assigned by the admin, so caring about it at the installer level
> is not very helpful.

Indeed.

Cheerio,
Hauke

-- 
Hauke Fath
Linnéweg 7
64342 Seeheim-Jugenheim
Germany


Re: sysinst username length limit

2024-04-03 Thread Martin Husemann
On Wed, Apr 03, 2024 at 10:53:58AM +0200, Hauke Fath wrote:
> > The limit still exists if you use NIS to manage passwords.
> 
> It does? My YP master says
> 
> % awk -F: '{ if (length($1) > 8) { print $1 }}' < /etc/passwd | wc -l
>   18
> %
> 
> The linux and freebsd clients seem to be fine with that.
> 
> I don't use {passwd,group}_compat, though.

I don't know for sure, I don't use it myself.

IIRC you could always use longer names if they were unique within the first
8 chars.

Maybe it would be ok to ignore any such limits anyway since in setups where
they apply you would either know about it (you are the admin) or would get
your login assigned by the admin, so caring about it at the installer level
is not very helpful.

Martin


Re: sysinst username length limit

2024-04-03 Thread Hauke Fath
On Wed, 3 Apr 2024 07:50:33 +0200, Martin Husemann wrote:
> On Wed, Apr 03, 2024 at 05:34:21AM +, Charlotte Koch wrote:
>> The 8 character limit is probably some historical thing, and besides,
>> it's completely bogus. I create accounts called 'charlotte' (9 chars)
>> all the time, with and without sysinst.
> 
> The limit still exists if you use NIS to manage passwords.

It does? My YP master says

% awk -F: '{ if (length($1) > 8) { print $1 }}' < /etc/passwd | wc -l
  18
%

The linux and freebsd clients seem to be fine with that.

I don't use {passwd,group}_compat, though.

Cheerio,
Hauke

-- 
Hauke Fath
Linnéweg 7
64342 Seeheim-Jugenheim
Germany


Re: sysinst username length limit

2024-04-02 Thread Martin Husemann
On Wed, Apr 03, 2024 at 05:34:21AM +, Charlotte Koch wrote:
> The 8 character limit is probably some historical thing, and besides,
> it's completely bogus. I create accounts called 'charlotte' (9 chars)
> all the time, with and without sysinst.

The limit still exists if you use NIS to manage passwords.

Martin


sysinst username length limit

2024-04-02 Thread Charlotte Koch

Hola gang,

When sysinst(8) invites the user to create a new user account, it
alludes to a username limitation of 8 characters. The exact wording for
this was recently changed in the English case, to avoid potential
confusion. But I suggest we can avoid all confusion by removing mention
of any maximums outright.

The 8 character limit is probably some historical thing, and besides,
it's completely bogus. I create accounts called 'charlotte' (9 chars)
all the time, with and without sysinst.

What do we think of the attached patch?

CharlotteIndex: msg.mi.de
===
RCS file: /cvsroot/src/usr.sbin/sysinst/msg.mi.de,v
retrieving revision 1.45
diff -b -u -r1.45 msg.mi.de
--- msg.mi.de   31 Oct 2023 14:05:11 -  1.45
+++ msg.mi.de   3 Apr 2024 05:20:28 -
@@ -1291,7 +1291,7 @@
 message cantsave {�nderungen k�nnen nicht gespeichert werden.}
 message noroot {Fortsetzen unm�glich, da keine Root-Partition definiert ist\n}
 
-message addusername {Benutzername (maximal 8 Zeichen)}
+message addusername {Benutzername}
 message addusertowheel {Diesen Benutzer der Gruppe 'wheel' hinzuf�gen?}
 
 message Delete_partition
Index: msg.mi.en
===
RCS file: /cvsroot/src/usr.sbin/sysinst/msg.mi.en,v
retrieving revision 1.48
diff -b -u -r1.48 msg.mi.en
--- msg.mi.en   21 Mar 2024 02:24:35 -  1.48
+++ msg.mi.en   3 Apr 2024 05:20:29 -
@@ -1217,7 +1217,7 @@
 message cantsave {Changes cannot be saved.}
 message noroot {No root partition defined.  Cannot continue\n}
 
-message addusername {Username to add (maximum 8 characters)}
+message addusername {Username to add}
 message addusertowheel {Do you wish to add this user to group wheel?}
 
 message Delete_partition
Index: msg.mi.es
===
RCS file: /cvsroot/src/usr.sbin/sysinst/msg.mi.es,v
retrieving revision 1.40
diff -b -u -r1.40 msg.mi.es
--- msg.mi.es   31 Oct 2023 14:03:33 -  1.40
+++ msg.mi.es   3 Apr 2024 05:20:29 -
@@ -1268,7 +1268,7 @@
 message cantsave {Los cambios no se pueden guardar.}
 message noroot {No hay una partici�n ra�z definida, no puede continuar \n}
 
-message addusername {8 character username to add}
+message addusername {Nombre de usuario}
 message addusertowheel {Do you wish to add this user to group wheel?}
 message Delete_partition
 {Borrar partici�n}
Index: msg.mi.fr
===
RCS file: /cvsroot/src/usr.sbin/sysinst/msg.mi.fr,v
retrieving revision 1.45
diff -b -u -r1.45 msg.mi.fr
--- msg.mi.fr   31 Oct 2023 14:03:33 -  1.45
+++ msg.mi.fr   3 Apr 2024 05:20:30 -
@@ -1307,7 +1307,7 @@
 message cantsave {Aucune modification ne peut �tre sauv�.}
 message noroot {Aucune partition racine d�fini, ne peut pas continuer \n 
continue\n}
 
-message addusername {Nom d'utilisateur (8 caract�res)}
+message addusername {Nom d'utilisateur}
 message addusertowheel {Ajouter cet utilisateur au groupe "wheel" ?}
 message Delete_partition
 {Supprimer la partition}
Index: msg.mi.pl
===
RCS file: /cvsroot/src/usr.sbin/sysinst/msg.mi.pl,v
retrieving revision 1.46
diff -b -u -r1.46 msg.mi.pl
--- msg.mi.pl   31 Oct 2023 14:03:33 -  1.46
+++ msg.mi.pl   3 Apr 2024 05:20:30 -
@@ -1217,7 +1217,7 @@
 message cantsave {Zmiany nie moga byc zapisane.}
 message noroot {Brak zedfiniowanej partycji /. Nie mozna kontynuowac.\n}
 
-message addusername {Nazwa nowego uzytkownika (8 zn.)}
+message addusername {Nazwa nowego uzytkownika}
 message addusertowheel {Chcesz dodac tego uzytkownika do grupy wheel?}
 message Delete_partition
 {Usun partycje}