Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've setup server on mac using virtualbox and my server is centos. but the guy who did it for me he forgot the root password that he setup at the beginning and what happen now is my website have a lot of problem due to the permission issues.

So what can I do in order to retrive the password or even to change my permission without using root?

The group for my website is apache and I believe I'm not in the same group.

share|improve this question
3  
Reset your root password. serverfault.com/questions/132837/… –  Zoredache Apr 9 '12 at 16:17

1 Answer 1

up vote 3 down vote accepted

If you have an access to the console and you have as it is virtualbox guest you can try to:

  • Reset a password using single user mode
  • Reset a password with init=/bin/sh (where single user mode is password protected)

Reset a password using single user mode

  • Reboot a guest
  • At the GRUB splash screen at boot time, press any key to enter the GRUB interactive menu
  • Select version of the kernel that you wish to boot and type "a" to append the line.
  • Go to the end of the line and type "single" as a separate word. Press Enter to exit edit mode.
  • Boot the kernel
  • Change the password (passwd command)

Reset a password with init=/bin/sh (where single user mode is password protected)

  • Reboot a guest
  • At the GRUB splash screen at boot time, press any key to enter the GRUB interactive menu
  • Select version of the kernel that you wish to boot and type "a" to append the line.
  • Go to the end of the line and type "init=/bin/sh" as a separate word. Press Enter to exit edit mode.
  • Boot the kernel
  • Remount filesystem read-write: mount -o remount -a
  • Change the password (passwd command)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.