Three configurations steps you need to do .
1.Enable the Guest Access in Enrollment. Setting -> Site Administration -> Plugins -> Authentication -> Manage Authentication .
2. Enabling guest access for a course. Select the course that you want to give Guest access.
Settings -> Course Administration -> Users -> Enrolled Users -> Enrolment methods -> If the Guest access enrolment is not listed on this page, use the Add method drop-down list to add it.
Enable this method at Settings -> Course Administration -> Edit settings, from the Allow guest access drop-down list , select Yes.
3. Make sure you check the box at Settings->Site administration->users->permissions->user policies-> Auto -login guests.