<< NumberTheory`NumberTheoryFunctions`

Choose a six digit prime  ...

p = 100981

... such that p - 
      1 has small factors:

FactorInteger[p - 1]

7 is a primitive root mod p:

alpha = 7

PowerMod[alpha, (p - 1)/2, p]

PowerMod[alpha, (p - 1)/3, p]

PowerMod[alpha, (p - 1)/5, p]

PowerMod[alpha, (p - 1)/11, p]

PowerMod[alpha, (p - 1)/17, p]

Compute alpha inverse for later use:

alpha' = PowerMod[alpha, -1, p]

What' 
      s the discrete log of b to the base 2?  Call it a.

b = 54321

PowerMod[b, (p - 1)/2, p]

So a is congruent to 1 mod 2.

b1 = Mod[b*alpha', p]

PowerMod[b1, (p - 1)/4, p]

Thus a is congruent to 1 mod 4.

Now look at a mod powers of 3.

Do[Print[PowerMod[7, i*(p - 1)/3, p]], {i, 0, 2}]

PowerMod[b, (p - 1)/3, p]

PowerMod[b, (p - 1)/9, p]

b1 = Mod[b*alpha'^3, p]

PowerMod[b1, (p - 1)/27, p]

So a is congruent to 21  =  
      0  +  1*3  + 2*9  modulo 27

t = Table[PowerMod[7, i*(p - 1)/5, p], {i, 1, 5}]

Do[If[PowerMod[b, (p - 1)/5, p] ==  t[[i]], 
        Print[i]], {i, 1, 5}]

So a is congruent to 4 mod 5

t = Table[PowerMod[7, i*(p - 1)/11, p], {i, 1, 11}]

Do[If[PowerMod[b, (p - 1)/11, p] ==  t[[i]], 
        Print[i]], {i, 1, 11}]

So a is congruent to 7 mod 11

t = Table[PowerMod[7, i*(p - 1)/17, p], {i, 1, 17}]

Do[If[PowerMod[b, (p - 1)/17, p] ==  t[[i]], 
        Print[i]], {i, 1, 17}]

And a is congruent to 5 mod 17.

ChineseRemainderTheorem[{1, 21, 4, 7, 5}, {4, 27, 5, 11, 
        17}]

Check:

PowerMod[7, 35229, p]