For an entrepreneur who was down on his luck it was almost too good a deal to pass up.

Wally Amos had long ago lost control of Famous Amos, the cookie company he founded in 1975, and had even lost the right to use his name or the famous likeness of himself with his salt-and-pepper beard, Panama hat and embroidered Indian shirt. At one point, he lost his house. He was reduced to calling his own cookie line Uncle Noname, and the business was struggling.

Then in March the Keebler Company, the new owner of Famous Amos, offered Mr. Amos a two-year contract to promote his old brand. And Keebler was willing to let him use his name for his own business.

Mr. Amos was hardly in a position to play the tough negotiator. Yet, after sampling the cookies that Keebler was selling, he couldn't help himself.

''Somehow or another caramel coloring had been added and I don't know why that was,'' the 63-year-old Mr. Amos said, the lines in his forehead becoming more pronounced. ''And they were using a real low-grade vanilla flavoring, and I always used vanilla extract. One of the first things I shared with Keebler when we met was that I couldn't promote the product they were currently selling, that if I were going to be a part of it we had to make some adjustments so that it could be closer to a Wally Amos product.''