Today (Saturday) We will make some minor tuning adjustments to MySQL.

You may experience 2 up to 10 seconds "glitch time" when we restart MySQL. We expect to make these adjustments around 1AM Eastern Daylight Saving Time (EDT) US.


how to retrieve root paswd


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Question how to retrieve root paswd

Hi..frnds..

I am a newcomer in the world of unix......i want to know if by smhow smone forget the root passwd is there any way to get it back....login as a odd user other than root..

please give suggession....

Thanks and regards.
prafulSmilie
# 2  
Well, assuming you're doing it lawfully, you should have access to the machine. If you are running Linux, head on over to www.toms.net/rb and grab tomsrtbt to boot into your system from a floppy. If you are running some other hardware/software combination than Linux on Intel, check your documentation for details on booting into mini-root. Mount the partition / disk that contains the /etc directory, and you'll have to edit the passwd (or shadow, if you're using shadowed passwords) file. Clear out the password field for root, so it should look like this:

root::0:0::/:/sbin/sh
instead of
root:/z4qjkR6ptOeEOvY:0:0::/:/sbin/sh
[Note: that is a munged passwd - don't waste your time trying to crack it. I just made it up. A normal password field would have 13 characters, and MD5 passwords have many more.]

Now, boot the system normally. You should be able to log in as root (or use su - ) without a password. Now make sure to set a good, rememberable (no, I don't think that's a work either) password!

You can also delegate root privelages to other accounts by editing the passwd file, but that's not always a good idea - especially on a production system.

HTH

# 4  
Well with Linux this could be even easier:

at LILO prompt (or boot prompt) :
type linux -s or linux 1 or linux single

This will drop you into a root shell without asking a password.

When the bash# prompt appears, enter:
passwd

This will prompt you for a new root password, without asking the old one!

# 5  
Question How do I restrict leve 1?

I've had a problem in the past of a user coming into the office, rebooting the server and booting in single user mode and then changing the passwd.

How do I restrict booting into single user mode?

Thanks in advance.

VJ
# 6  
Lightbulb

You _can_ stop people playing with your server totally, if you know how to do it... here are some instructions :

1)Disable all boot devices except harddisk in BIOS
2)Password BIOS
3)vi /etc/lilo.conf

add 'restricted=' option (look at man lilo.conf for more details)
add 'password=' option (again its in the man pages)

run lilo to apply changes

essentially you can restrict command line input (hence getting round the linux single problem, and you can also password the command the user wants to run (hence you can still do single if you know the password) Just make sure the default image is still bootable without user input, otherwise if it gets rebooted it'll stop at lilo.

Be careful with this, if the system screws and you cant get in you'll need to sort the BIOS and boot off floppy, then manually run lilo on the volume.

Any problems or further queries, drop me a mail
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Can a root role change the root password in Solaris 10?

i do not have root on a solairs 10 server , however i do have the root role, i was wondering if I can change the root password as a a role with the passwd command? I have not tried yet. and do i have to use the # chgkey -p afterwards? i need to patch is why i am asking. thanks (1 Reply)
Discussion started by: goya
1 Replies

2. UNIX for Dummies Questions & Answers

Can you gain root privileges if the suid program does not belong to root?

I had a question in my test which asked where suppose user B has a program with 's' bit set. Can user A run this program and gain root privileges in any way? I suppose not as the suid program run with privileges of owner and this program will run with B's privileges and not root. (1 Reply)
Discussion started by: syncmaster
1 Replies

3. Shell Programming and Scripting

Find users with root UID or GID or root home

I need to list users in /etc/passwd with root's GID or UID or /root as home directory If we have these entries in /etc/passwd root:x:0:0:root:/root:/bin/bash rootgooduser1:x:100:100::/home/gooduser1:/bin/bash baduser1:x:0:300::/home/baduser1:/bin/bash... (6 Replies)
Discussion started by: anil510
6 Replies

4. SuSE

Auditors want more security with root to root access via ssh keys

I access over 100 SUSE SLES servers as root from my admin server, via ssh sessions using ssh keys, so I don't have to enter a password. My SUSE Admin server is setup in the following manner: 1) Remote root access is turned off in the sshd_config file. 2) I am the only user of this admin... (6 Replies)
Discussion started by: dvbell
6 Replies

5. Solaris

Migration of system having UFS root FS with zones root to ZFS root FS

Hi All After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Discussion started by: sb200
2 Replies

6. Solaris

Lost Root Password on VXVM Encapsulated Root Disk

Hi All Hope it's okay to post on this sub-forum, couldn't find a better place I've got a 480R running solaris 8 with veritas volume manager managing all filesystems, including an encapsulated root disk (I believe the root disk is encapsulated as one of the root mirror disks has an entry under... (1 Reply)
Discussion started by: sunnyd76
1 Replies

7. UNIX for Dummies Questions & Answers

How to allow access to some commands having root privleges to be run bu non root user

hi i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help Thanks (5 Replies)
Discussion started by: suryashikha
5 Replies

8. AIX

Can't login root account due to can't find root shell

Hi, yesterday, I changed root's shell in /etc/passwd, cause a mistake then I can not log in root account (can't find correct shell). I attempted to log in single-mode, however, it prompted for single-mode's password then I type root's password but still can not log in. I'm using AIX 5L version 5.2... (2 Replies)
Discussion started by: neikel
2 Replies

9. Linux

how to access root priveliges if root password is lost

wish to know how to access root password it root password is forgotten in linux (1 Reply)
Discussion started by: wojtyla
1 Replies

10. UNIX for Dummies Questions & Answers

Run non-root script as root with non-root environment

All, I want to run a non-root script as the root user with non-root environment variables with crontab. The non-root user would have environment variables for database access such as Oracle or Sybase. The root user does not have the Oracle or Sybase enviroment variables. I thought you could do... (2 Replies)
Discussion started by: bubba112557
2 Replies

Featured Tech Videos