Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


I lost a root password and i need to give it, I treid to
change it through single usermode even though i am not get
a password, then what is the other procedure to give a root
password?

Answers were Sorted based on User's Feedback



I lost a root password and i need to give it, I treid to change it through single usermode even th..

Answer / hari

hi....
restart->goto shalsh mode(safe mode)->press e->select 2nd kernel line->press e, give 1(for single user mode)nd ENTER
press b(for boot)->sh-3.1# ll appear
then,sh-3.1#passwd root->now give the (new) passwd

Is This Answer Correct ?    6 Yes 2 No

I lost a root password and i need to give it, I treid to change it through single usermode even th..

Answer / sachinmali17

you need to check /etc/securetty file and u have check the permission this file

Is This Answer Correct ?    2 Yes 0 No

I lost a root password and i need to give it, I treid to change it through single usermode even th..

Answer / kvenkat

Login into single user mode and try below things:
1. passswd [ Change Password for root ]
2. rm -rf /etc/nologin
3. remove any "nologin" shell for root user in /etc/passwd file
4. chage -l root then chage -E root
5. passwd -u root
6. chattr -i /etc/passwd /etc/shadow
7. chmod 600 /etc/securetty
8. vim /etc/rc.local --> then remove any line like say "
/etc/nplogin "
9. chsh root [ /bin/bash ]

Is This Answer Correct ?    2 Yes 0 No

I lost a root password and i need to give it, I treid to change it through single usermode even th..

Answer / sampath

It will be easy to recover the root password using single
user mode, but single user mode is secured by grub password.
so that it will restrict the users by logging to the single
user mode.

we can unmake the entry in the grub.conf file by entering
the rescue mode.

Is This Answer Correct ?    1 Yes 0 No

I lost a root password and i need to give it, I treid to change it through single usermode even th..

Answer / rallapalli

Enter into Single user mode and check the /etc/shadow file
is there are not if it is not there do this
#cp /etc/shadow~ /etc/shadow
now give the password
#passwd



Thanks

Is This Answer Correct ?    0 Yes 0 No

I lost a root password and i need to give it, I treid to change it through single usermode even th..

Answer / amit tanwar

i think check the permission on passwd command.

Is This Answer Correct ?    0 Yes 0 No

I lost a root password and i need to give it, I treid to change it through single usermode even th..

Answer / l praveen kumar

Following is the procedure to reset root password if you are
using GRUB as a boot loader:

1. Select the kernel
2. Press the e key to edit the entry
3. Select second line (the line starting with the word
kernel)
4. Press the e key to edit kernel entry so that you can
append single user mode
5. Append the letter S (or word Single) to the end of the
(kernel) line
6. Press ENTER key
7. Now press the b key to boot the Linux kernel into
single user mode
8. At prompt type passwd command to reset password:

You need to mount at least / and other partitions:

# mount -t proc proc /proc
# mount -o remount,rw /

Change the root password, enter:

# passwd

Finally reboot system:

# sync
# reboot

Is This Answer Correct ?    0 Yes 0 No

I lost a root password and i need to give it, I treid to change it through single usermode even th..

Answer / anonymous

If you are in the list of sudoers than you can also change
the root password using

sudo passwd

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Linux Commands Interview Questions

1.what is Kernel parameters? 2.how many cpu have use in your machine?

3 Answers   ConSim,


What is umask in linux?

0 Answers  


What is difference between comm and CMP command?

0 Answers  


What is nbtstat command?

0 Answers  


What does c mean in linux?

0 Answers  


What the command used for list the contents of your home directory, current directory and all subdirectories?

0 Answers  


Explain grep command.

0 Answers  


What would be the result of issuing the command cat phonenos?

0 Answers  


List all the files beginning with A

10 Answers  


What does umask 022 mean?

0 Answers  


I have Laptop. I want to assign DHCP ip address, but in my Laptop having Wireless and with wire NIC cards, it is possible to assign reserve ip address for both NIC card, but same host name?

4 Answers   AOL,


How do display error messages instantly when command fails?

2 Answers   Satyam,


Categories