ubuntu root access

16

Click here to load reader

Upload: mohankumar-palanichamy

Post on 15-May-2015

2.738 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Ubuntu root access
Page 2: Ubuntu root access

ROOT & SUDO

The root user in GNU/Linux is the user which has administrative access to your system. Normal users do not have this access for security reasons. However, Ubuntu does not include the root user. Instead, administrative access is given to individual users, who may use the "sudo" application to perform administrative tasks. The first user account you created on your system during installation will, by default, have access to sudo. You can restrict and enable sudo access to users with the Users and Groups application.

Page 3: Ubuntu root access

When you run an application that requires root privileges, sudo will ask you to input your normal user password. This ensures that rogue applications cannot damage your system, and serves as a reminder that you are about to perform administrative actions which require you to be careful!

To use sudo when using the command line, simply type "sudo" before the command you wish to run. Sudo will then prompt you for your password.

Sudo will remember your password for a set amount of time. This feature was designed to allow users to perform multiple administrative tasks without being asked for a password each time.

Page 4: Ubuntu root access

To change the password via terminal

$sudo passwd root

Enter the new password and Retype the password to confirm.

To disable password

If you don't want password to authenticate while application installation, login......

$sudo passwd -I root

Page 5: Ubuntu root access

While you are working as user, you need to access the root, but you dono the root password, just type

$sudo -i

Enter your user password and start work as root.

Page 6: Ubuntu root access

Root Passwd Reset

You forget the root password, you need to login as root.

To do this you have to reset or change the password.

Page 7: Ubuntu root access

First, you have to reboot into recovery mode.

If you have a single-boot (Ubuntu is the only operating system on your computer), to get the boot menu to show, you have to hold down the Shift key during bootup.

If you have a dual-boot (Ubuntu is installed next to Windows, another Linux operating system, or Mac OS X; and you choose at boot time which operating system to boot into), the boot menu should appear without the need to hold down the Shift key.

For older versions of Ubuntu (9.04 and 8.04), you can press the Escape key during bootup in order to see the boot menu.

Page 8: Ubuntu root access

From the boot menu, select recovery mode, which is usually the second boot option.

Page 9: Ubuntu root access
Page 10: Ubuntu root access

After you select recovery mode and wait for all the boot-up processes to finish, you'll be presented with a few options. In this case, you want the Drop to root shell prompt option so press the Down arrow to get to that option, and then press Enter to select it.

Page 11: Ubuntu root access
Page 12: Ubuntu root access

The root account is the ultimate administrator and can do anything to the Ubuntu installation (including erase it), so please be careful with what commands you enter in the root terminal.

Once you're at the root shell prompt, if you have forgotten your username as well, type

$ls /home

That's a lowercase L, by the way, not a capital i, in ls. You should then see a list of the users on your Ubuntu installation. In this case, I'm going to reset ckuser18 password.

Page 13: Ubuntu root access

To reset the password, type

$passwd username

where username is the username you want to reset. In this case, I want to reset ckuser's password, so I type

$passwd ckuser18

You'll then be prompted for a new password. When you type the password you will get no visual response acknowledging your typing. Your password is still being accepted. Just type the password and hit Enter when you're done. You'll be prompted to retype the password. Do so and hit Enter again.

Now the password should be reset. Type exit to return to the recovery menu.

Page 14: Ubuntu root access

After you get back to the recovery menu, select resume normal boot

Page 15: Ubuntu root access

Now you can login as root because you know the password.

Page 16: Ubuntu root access

HACK-ROOT ACCESS 1. You need to reboot your Ubuntu

2. When you reach GRUB page, press ‘e’ (without quotes), this command is to edit grub

3. Edit one of your boot command

4. Replace “ro qiuet splash” by “rw init=/bin/bash” at the end.

5. Press “ctrl x” or “b”, this will make your Ubuntu to boot with passwordless root shell,ie you will be logined as root without password.

6. Then just change your password with passwd username command. If it is root just type: passswd root

7. Reboot your system