I grew up in Billings Montana, which is about 100 miles from Yellowstone and about 475 miles from Glacier.
The Absaroka-Beartooth wilderness area is on the Northeast corner of Yellowstone and near Red Lodge Montana. It is my wilderness area. I spent many many happy hours on various trails in both the warmer months and winter months.
I would highly recommend you look at the Red Lodge website
http://www.redlodge.com/
Yellowstone is a very busy park in July/August. My favorite time is September as school has started and family vacations are over. Early spring (May) is a good time too, but many of the trails are still snow covered and the weather can be anything from hot to below zero. Most of the animals have their young and are down from the high elevations so this is something to consider. July/August in the Park is hot and buggy. September early October is usually nice but some of the facilities are closing and you can get caught in snow if too late in the season. Most of the animals are high up but start to move down.
The Park is not wilderness in any way around the "attractions" or roads but can be a wonderful place anyway. Getting even a km off the road on a trail opens up many wonderful places. The thermal basins are simply a wonder and a must do if you go to the Park. While I would not spend more than 3 days doing the Parks attractions 3-5 days in the backcountry, especially the south end of the Park, would be a grand trip. Spending time in the Greater Yellowstone Ecosystem in either Wyoming or Montana in the Beartooths is also a great way to spend some time.
There are some decent guides for dayhikes in the Beartooths
http://www.amazon.com/exec/obidos/t...=sr_1_20/102-1391038-8197752?v=glance&s=books
http://www.amazon.com/exec/obidos/t...=sr_1_11/102-1391038-8197752?v=glance&s=books
Definately look at Gary Ferguson's "Walking down the Wild" This one is a walk from outside the Park around the park and is both a good read and introduces some of the issues of the Greater Yellowstone Ecosystem.
http://www.amazon.com/exec/obidos/t...f=sr_1_8/102-1391038-8197752?v=glance&s=books
His "Rocky Mountain Walks" and other of his forest, wolf, etc books may be of interest too.
Montana is a wonder, around the Park or around Glacier/Flathead, but it is too huge to cover. For 5-6 weeks I would find a couple of places to spend the time in. I absolutely love the Yellowstone area but I spend my youth in the Beartooths and we now go to Yellowstone about every other year. Glacier/Waterton is very different terrain but is also just beautiful.
There are plenty of guides for the Parks, and they are great places, but they are not wilderness and you are restricted from many bushcraft techniques (like cutting wood and fires). The Wilderness areas of the Absaroka-Beartooth is grand. You can drive to 10,000 feet and wander across huge expanses of granite on Plateaus studded with mountain lakes. This is my favorite thing to do. Spend a few days in the Park as you will never forget it, but walk a good bit in the areas around Cooke City Montana or along the Chief Joseph highway in Wyoming.
Get an official Montana highway map
http://www.mdt.state.mt.us/map/order_hwymap.html
I also recommend these State topo map books
http://www.amazon.com/exec/obidos/t...102-1391038-8197752?v=glance&s=books&n=507846
These are great for planning purposes and you can then order the maps needed.
Red Lodge Office Suppy carries many maps, call or write them ahead if you decide to go around the Park.
Remember distances in Montana are huge. It can take 1.5 to 2 days to drive across the State East-West, a good portion of one day to drive North-South.
Have fun.