You simply need something wet like citrus juice or simple syrup to wet the rim with before dipping into the sugar. Once you let the sugar sit on the rim for a few minutes it should harden onto the glass.