In statistical thermodynamics, when using the method of Lagrange multipliers, we obtain an expression as
$$-\ln \rho = \alpha + \beta H$$
where $\alpha$ and $\beta$ are the multipliers to be determined. Multiplying by the Boltzmann constant and averaging we obtain the entropy
$$\langle S \rangle = k_\mathrm{B}\alpha + k_\mathrm{B} \beta \langle H \rangle$$
Comparing with the thermodynamic entropy for a closed system at constant composition (Euler expression)
$$S = S_0 + \frac{U}{T}$$
you obtain the value $\beta = 1/k_\mathrm{B}T$.
You could try an alternative method by defining a Lagrange multiplier $\beta' = 1/\beta$,
$$-\ln \rho = \alpha + H / \beta'$$
Repeating the above procedure you would obtain the value $\beta' = k_\mathrm{B}T$, but I do not find any advantage in this.