[Proftpd-user] Proftpd AuthGroupFile

Steven Driesmans via Proftp-user <[email protected]> Thu, 5 Sep 2024 17:02:08 +0000
Newsgroups gmane.network.proftpd.user
Message-ID <DB9PR01MB102677058ED28EC3FBC677B5BC79D2@DB9PR01MB10267.eurprd01.prod.exchangelabs.com>
--===============7695762533241714945==
Content-Language: en-US
Content-Type: multipart/alternative;
	boundary="_000_DB9PR01MB102677058ED28EC3FBC677B5BC79D2DB9PR01MB10267eu_"

--_000_DB9PR01MB102677058ED28EC3FBC677B5BC79D2DB9PR01MB10267eu_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Dear all,

A virtual groups file (AuthGroupFile definition inside the proftpd config f=
ile underneath /etc/proftpd/conf.d) has one group that contains 64 or more =
virtual users.

Some time ago, adding a new virtual user to that specific group lead to the=
 following error message inside the sftp logfile:

Jul 10 12:54:28 <hostname> proftpd[1176232]: session[1176232] <IP-address> =
(<IP-address>[<IP-address>]): Malformed entry in AuthGroupFile file (line 8=
5)
Jul 10 12:54:28 <hostname> proftpd[1176232]: session[1176232] <hostname> (<=
IP-address>[<IP-address>]): Malformed entry in AuthGroupFile file (line 170=
)
Jul 10 12:54:28 <hostname> proftpd[1176232]: realloc(): invalid next size


  *   I scrambled the original hostname and IP-addresses from the logs
  *   There are only 84 lines in the AuthGroupFile !
[root@<hostname> conf.d]#

wc -l <sftp-fqdn>.groups

84 sftp.dewatergroep.be.groups
[root@<hostname> conf.d]#

Info on link https://fossies.org/linux/proftpd/doc/howto/LogMessages.html t=
alks about the most common cause for this :

"Malformed entry in AuthUserFile/AuthGroupFile"
The configured AuthUserFile/AuthGroupFile<https://fossies.org/linux/proftpd=
/doc/howto/AuthFiles.html> has a line which is not in the necessary format.=
 The most common cause for this is when one of the file fields is missing, =
or if there an extra colon (':') character in a field (e.g. in the name fie=
ld).

I already looked inside the AuthUsersFile to check if the specific user(s) =
have a malformed entry, which is not the case.
Also nothing special or abnormal to be seen or found in the AuthGroupFile.
Moving the specific virtual user more to the beginning of the specific virt=
ual group does work, so some sort of limitation must be in place somewhere.=
..

Current version of OS : RHEL 8.10
Current version of proftpd : 1.3.6e

It looks like there's a limit of maximum characters or users for one virtua=
l group, but I cannot find any info about this...

[root@<hostname> conf.d]# grep -v ^# <sftp-fqdn>.groups | grep svc | awk -F=
":" '{print $4}' | wc -c
1067
[root@<hostname> conf.d]#
[root@<hostname> conf.d]# grep -v ^# <sftp-fqdn>.groups | grep svc | awk -F=
":" '{print $4}' | tr -s "," " " |wc -w
64
[root@<hostname> conf.d]#

Anybody that can help me out or point me in the right direction ?

Best regards,
Steven Driesmans


Sensitivity: Company

--_000_DB9PR01MB102677058ED28EC3FBC677B5BC79D2DB9PR01MB10267eu_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Verdana;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;
	mso-ligatures:standardcontextual;
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:36.0pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;
	mso-ligatures:standardcontextual;
	mso-fareast-language:EN-US;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
/* List Definitions */
@list l0
	{mso-list-id:1814365033;
	mso-list-type:hybrid;
	mso-list-template-ids:1306148332 625214694 134807555 134807557 134807553 1=
34807555 134807557 134807553 134807555 134807557;}
@list l0:level1
	{mso-level-start-at:0;
	mso-level-number-format:bullet;
	mso-level-text:\F0F0;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;
	mso-fareast-font-family:Calibri;
	mso-bidi-font-family:"Times New Roman";}
@list l0:level2
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Courier New";}
@list l0:level3
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l0:level4
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l0:level5
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Courier New";}
@list l0:level6
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
@list l0:level7
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
@list l0:level8
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:"Courier New";}
@list l0:level9
	{mso-level-number-format:bullet;
	mso-level-text:\F0A7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Wingdings;}
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-GB" link=3D"#0563C1" vlink=3D"#954F72" style=3D"word-wrap:=
break-word">
<div class=3D"WordSection1">
<p class=3D"MsoNormal">Dear all,<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">A virtual groups file (AuthGroupFile definition insi=
de the proftpd config file underneath /etc/proftpd/conf.d) has one group th=
at contains 64 or more virtual users.<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Some time ago, adding a new virtual user to that spe=
cific group lead to the following error message inside the sftp logfile:<o:=
p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><span style=3D"font-size:9.0pt;font-family:&quot;Cou=
rier New&quot;">Jul 10 12:54:28 &lt;hostname&gt; proftpd[1176232]: session[=
1176232] &lt;IP-address&gt; (&lt;IP-address&gt;[&lt;IP-address&gt;]): Malfo=
rmed entry in AuthGroupFile file (line 85)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:9.0pt;font-family:&quot;Cou=
rier New&quot;">Jul 10 12:54:28 &lt;hostname&gt; proftpd[1176232]: session[=
1176232] &lt;hostname&gt; (&lt;IP-address&gt;[&lt;IP-address&gt;]): Malform=
ed entry in AuthGroupFile file (line 170)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:9.0pt;font-family:&quot;Cou=
rier New&quot;">Jul 10 12:54:28 &lt;hostname&gt; proftpd[1176232]: realloc(=
): invalid next size<o:p></o:p></span></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<ul style=3D"margin-top:0cm" type=3D"disc">
<li class=3D"MsoListParagraph" style=3D"margin-left:0cm;mso-list:l0 level1 =
lfo1">I scrambled the original hostname and IP-addresses from the logs<o:p>=
</o:p></li><li class=3D"MsoListParagraph" style=3D"margin-left:0cm;mso-list=
:l0 level1 lfo1">There are only 84 lines in the AuthGroupFile !
<o:p></o:p></li></ul>
<p class=3D"MsoNormal" style=3D"margin-left:36.0pt;text-indent:36.0pt"><spa=
n style=3D"font-size:9.0pt;font-family:&quot;Courier New&quot;">[root@&lt;h=
ostname&gt; conf.d]#<o:p></o:p></span></p>
<p class=3D"MsoListParagraph" style=3D"margin-left:72.0pt"><span style=3D"f=
ont-size:9.0pt;font-family:&quot;Courier New&quot;">wc -l &lt;sftp-fqdn&gt;=
.groups<o:p></o:p></span></p>
<p class=3D"MsoListParagraph" style=3D"margin-left:72.0pt"><span style=3D"f=
ont-size:9.0pt;font-family:&quot;Courier New&quot;">84 sftp.dewatergroep.be=
.groups<o:p></o:p></span></p>
<p class=3D"MsoNormal" style=3D"margin-left:36.0pt;text-indent:36.0pt"><spa=
n style=3D"font-size:9.0pt;font-family:&quot;Courier New&quot;">[root@&lt;h=
ostname&gt; conf.d]#<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:9.0pt;font-family:&quot;Cou=
rier New&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal">Info on link <a href=3D"https://fossies.org/linux/pr=
oftpd/doc/howto/LogMessages.html">
https://fossies.org/linux/proftpd/doc/howto/LogMessages.html</a> talks abou=
t the most common cause for this :<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><i>&quot;Malformed entry in AuthUserFile/AuthGroupFi=
le&quot;<br>
The configured <a href=3D"https://fossies.org/linux/proftpd/doc/howto/AuthF=
iles.html">
AuthUserFile/AuthGroupFile</a> has a line which is not in the necessary for=
mat. The most common cause for this is when one of the file fields is missi=
ng, or if there an extra colon (':') character in a field (e.g. in the name=
 field).<o:p></o:p></i></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">I already looked inside the AuthUsersFile to check i=
f the specific user(s) have a malformed entry, which is not the case.
<o:p></o:p></p>
<p class=3D"MsoNormal">Also nothing special or abnormal to be seen or found=
 in the AuthGroupFile.<o:p></o:p></p>
<p class=3D"MsoNormal">Moving the specific virtual user more to the beginni=
ng of the specific virtual group does work, so some sort of limitation must=
 be in place somewhere&#8230;<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Current version of OS : RHEL 8.10<o:p></o:p></p>
<p class=3D"MsoNormal">Current version of proftpd : 1.3.6e<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">It looks like there&#8217;s a limit of maximum chara=
cters or users for one virtual group, but I cannot find any info about this=
&#8230;<o:p></o:p></p>
<p class=3D"MsoNormal"><span style=3D"font-size:9.0pt;font-family:&quot;Cou=
rier New&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:9.0pt;font-family:&quot;Cou=
rier New&quot;">[root@&lt;hostname&gt; conf.d]# grep -v ^# &lt;sftp-fqdn&gt=
;.groups | grep svc | awk -F&quot;:&quot; '{print $4}' | wc -c<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:9.0pt;font-family:&quot;Cou=
rier New&quot;">1067<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:9.0pt;font-family:&quot;Cou=
rier New&quot;">[root@&lt;hostname&gt; conf.d]#<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:9.0pt;font-family:&quot;Cou=
rier New&quot;">[root@&lt;hostname&gt; conf.d]# grep -v ^# &lt;sftp-fqdn&gt=
;.groups | grep svc | awk -F&quot;:&quot; '{print $4}' | tr -s &quot;,&quot=
; &quot; &quot; |wc -w<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:9.0pt;font-family:&quot;Cou=
rier New&quot;">64<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:9.0pt;font-family:&quot;Cou=
rier New&quot;">[root@&lt;hostname&gt; conf.d]#<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:9.0pt;font-family:&quot;Cou=
rier New&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal">Anybody that can help me out or point me in the righ=
t direction ?<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Best regards,<o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt"><b><span style=3D"fon=
t-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#232D4B;mso-=
ligatures:none;mso-fareast-language:EN-GB">Steven Driesmans</span></b><span=
 style=3D"mso-ligatures:none;mso-fareast-language:EN-GB"><o:p></o:p></span>=
</p>
</div>
<br>
<p style=3D"font-family:Arial;font-size:10pt;color:#000000;margin:5pt;font-=
style:normal;font-weight:normal;text-decoration:none;" align=3D"Center">
Sensitivity: Company<br>
</p>
</body>
</html>

--_000_DB9PR01MB102677058ED28EC3FBC677B5BC79D2DB9PR01MB10267eu_--



--===============7695762533241714945==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============7695762533241714945==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ProFTPD Users List   <[email protected]>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html
--===============7695762533241714945==--