A control device and a control program for a walking assist apparatus (1) set a desired lifting force to act on a user from a seat (2) and distribute the desired lifting force to each leg link (3) of the walking assist apparatus according to the ratios of treading forces of the legs of the user measured on the basis of outputs of force sensors (38,39) so as to determine the share for each leg link. Then, an actuator (27) of each leg link is controlled to generate a force for the determined share. Thus, a force required for the user to support himself/herself with his/her leg or legs on a floor can be reduced while using a reduced number of parts to be attached to each leg of the user. Moreover, an assist force for achieving such a reduced required force can be properly shared between the leg links associated with the legs of the user.