The principle of maximum entropy (PME), as expounded by Jaynes, is based on the maximization of the Boltzmann-Gibbs-Shannon (BGS) entropy subject to linear constraints. The resulting probability distributions are of canonical (exponential) form. However, the rationale for linear constraints is nebulous, and probability distributions are not always canonical. Here we show that the correct noncanonical distribution for a system in equilibrium with a finite heat bath is implied by the unconstrained maximization of the total BGS entropy of the system and bath together. This procedure is shown to be equivalent to maximizing the BGS entropy of the system alone subject to a contrived nonlinear constraint which reduces to (a) the usual linear constraint for an infinite heat bath, and (b) a previously enigmatic logarithmic constraint which implies a power-law distribution for a large but finite heat bath. This procedure eliminates the uncertainty as to the proper constraints, and easily generalizes to arbitrary composite systems, for which it provides a simpler alternative to the Jaynes PME.