LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Resetting File Sharing Server Password on Ubuntu (https://www.linuxquestions.org/questions/linux-newbie-8/resetting-file-sharing-server-password-on-ubuntu-916000/)

trojan92 11-28-2011 09:25 AM

Resetting File Sharing Server Password on Ubuntu
 
hi there, can anybody help me out on this problem:
someone setup a file sharing server with ubuntu and i cannot get access to login as root and do some modifications for a client.
How can i reset the root/sudo password on this system?

Thanks in advance,
Troj.

prayag_pjs 11-28-2011 01:17 PM

There are two methods :

1.Login as single user method and change the user password or root password(if bootloader is not having as password)

Step 1: Power up the machine.
Step 2: When the GRUB boot loader starts, select "e" to edit the configuration. Select the kernel config line. Instead of adding "1 " or "single" to the end of the line aka Red Hat, add this instead:
"init=/bin/bash"
Step 3: Hit "b" to boot the system.
Step 4: When the system boots and brings you to a command prompt, type this command to mount the root file system: " mount / -o remount,rw"
Step 5: Now you can change the password by typing "passwd" followed by your username, then hit enter. Follow the prompts to change the password for your regular username (not root).
Step 6: Unmount the file system: "mount / -o remount,ro"
Step 7: Now type "sync", hit enter, then type "reboot".
Step 8: After your system boots you should find yourself at the login screen, only this time you can log in with your new password!

2.Use rescuse cd/dvd to reset the password

mmidgett 11-29-2011 04:43 PM

What is the purpose of the command 'sync'?

I just did this for a customer at the colo and I didn't use this command.

prayag_pjs 12-05-2011 08:27 AM

Hi,

Entering the sync command, ensures that all data in memory is safely written to disk.

Even if you don't run the command,purpose will be solved.

If your issue is resolved. Please mark it as SOLVED.


All times are GMT -5. The time now is 03:29 AM.