LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-14-2009, 10:01 AM   #16
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 216Reputation: 216Reputation: 216

palisetty_suman as has been said many times, single user mode in grub. I was just saying incase you had rights for sudo an easier method.

If you follow the links earlier on you should see have to achieve this.

Last edited by r3sistance; 02-14-2009 at 10:04 AM.
 
Old 02-14-2009, 03:46 PM   #17
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
WOW, thanks for the disrespect. Perhaps it is you that can't understand what we're telling you. thierrys requested a very specific piece of information from you and you ignored it. "Junior Hacker" GAVE you the best answer for what you seek but you couldn't bother to read what he said.

You are dead to me.
 
Old 02-14-2009, 06:02 PM   #18
pentode
Member
 
Registered: Dec 2005
Location: Oregon
Distribution: Debian Testing
Posts: 488

Rep: Reputation: 38
Quote:
I am not satisfied with the answer my friends gae it to me
Well you are free to take your business elsewhere. Some additional information was requested that you did not provide so no one was interested in helping you. And if it such a simple question, why do you need to ask it here?

I'm sure some additional Googling will work for you..
 
Old 02-14-2009, 06:16 PM   #19
palisetty_suman
Member
 
Registered: Feb 2007
Location: TX, USA
Distribution: fedora
Posts: 191

Original Poster
Rep: Reputation: 33
Angry Re: Root password

HELLO moderators
don't be so sarcastic, i have explained clearly that if some student comes to me and asks me that he forgot his root password and he can log in into only his normal user account and he wants me to get me a new password or recover the previous password for the root. Then what should i do. I didn't ask u to give bullshit abuses. if u don't know pls don't reply rather than shouting at something which u don't know.
 
Old 02-14-2009, 06:20 PM   #20
palisetty_suman
Member
 
Registered: Feb 2007
Location: TX, USA
Distribution: fedora
Posts: 191

Original Poster
Rep: Reputation: 33
Re: Root password

Atleast some of the moderators though not all are kind and give good answers. I respect them.
 
Old 02-14-2009, 07:14 PM   #21
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
palisetty_suman

I really do not think you understand how this forum works. So far I do not think that any MODERATORS have posted to this thread and they usually will not. This forum is mostly one user helping others in the hope that it will be passed forward. You have been given the answer several times and asked if they have physical access to the machine (which I have yet to see an answer to). Go back and read the provided information and provide the required information.

Good Luck
 
Old 02-14-2009, 08:19 PM   #22
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
I don't get it why you give newbie a hard time. It doesn't look like he has done something "seriously wrong" (yet).
If you don't like reply for specific reason, you can always redirect person to "how to ask questions smart way" or to "google"(including advanced search operators) or if questions is basic and is covered in faq you can post link to the faq - at least it will put person in the "right tracks" faster.

Single-user boot is explained here (for both grub and lilo):
http://www.redhat.com/docs/manuals/l...ng-single.html

Keeping grub/lilo options away, (encrypted) passwords are stored in /etc/passwd and /etc/shadow , and you can access and modify them(which may be tricky) from livecd if you have physical access to machine, but single-user booting will be much easier. format of files is explained in "man passwd" and "man 5 passwd".

Last edited by ErV; 02-14-2009 at 08:27 PM.
 
Old 02-14-2009, 08:27 PM   #23
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
ErV

That is why knowing if the students have physical access to the machine is so critical. IF they do not have physical access, they cannot use the method you provided.
 
Old 02-14-2009, 08:34 PM   #24
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by lazlow View Post
ErV

That is why knowing if the students have physical access to the machine is so critical. IF they do not have physical access, they cannot use the method you provided.
Poster didn't say if students have physical access to machine or not, so I assume they do have it.
If they don't have it - it is unlikely that they are roots there, so they should contact administrator.
And AFAIK discussing how to crack linux box remotely is forbidden by the rules of this forum.
Anyway, AFAIK without physical access to machine, without sudo entries, normal user can't change root password, unless there is a security hole in the system. This is because /etc/passwd and /etc/sudoers are accessible only by root. If I'm wrong and there is solution that doesn't break forum rules - then post it.

Last edited by ErV; 02-14-2009 at 08:40 PM.
 
Old 02-14-2009, 08:53 PM   #25
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
ErV

What you are apparently unaware of is that many schools have machines (usually VMs) where the students do have root access but do not have physical access to the machines. This is very similar to the way web hosting is often handled. You get a VM on a machine and you have root access to that VM (not the host), which is exactly why many schools have things set up this way. So it is not at all uncommon for someone to have root access to a machine but not have physical access to that same machine.
 
Old 02-14-2009, 09:01 PM   #26
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by lazlow View Post
ErV

What you are apparently unaware of is that many schools have machines (usually VMs) where the students do have root access but do not have physical access to the machines. This is very similar to the way web hosting is often handled. You get a VM on a machine and you have root access to that VM (not the host), which is exactly why many schools have things set up this way. So it is not at all uncommon for someone to have root access to a machine but not have physical access to that same machine.
I said - "unlikely", not "impossible". VM can be rebooted, but it depends on what kind of access student have to VM. If there is no way to see boot menu of VM - then to me it looks like pretty same thing as being locked out of system with remote-only access
.
Anyway, poster didn't provide information about physical access (he/she didn't mention if it is even school), I have nothing else to say, so I'm out of here.

Last edited by ErV; 02-14-2009 at 09:04 PM.
 
Old 02-14-2009, 09:12 PM   #27
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
ErV

Quote:
Suppose a student came to me and asked that he forgot the password for the root and he can login as a normal user only.
From OP.

Student usually means a school is involved.

Quote:
but it depends on what kind of access student have to VM.
from ErV

Which is exactly why we wanted to know if the students had physical access.

Quote:
"unlikely"
LOTS of places have things set up this way. I would venture a guess that the majority of remote hosting is setup this way. So I would again say that this is by no means an uncommon setup(reasonably likely).
 
Old 02-14-2009, 09:30 PM   #28
niceguy_81333
Member
 
Registered: Mar 2008
Location: India
Distribution: RHEL5
Posts: 34

Rep: Reputation: 15
Hi Suman
I hope the following procedure meet your requirement.

If you are using grub
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:
9. You need to mount at least / and other partitions:
Code:
# mount -t proc proc /proc
# mount -o remount,rw /
10. Change the root password, enter:
Code:
# passwd
11.Finally reboot system:
Code:
# sync
# reboot
rgds
bil
 
Old 02-14-2009, 10:25 PM   #29
rtrahan
Member
 
Registered: Jan 2009
Location: Georgia
Distribution: OpenSuse Fedora
Posts: 64

Rep: Reputation: 17
@palisetty. Check out the website that Junior Hacker left on this thread. It gives you all directions on how to recover passwords. Only you know if you are doing the right thing so don't worry about others and get your job done.
 
Old 02-15-2009, 12:48 AM   #30
vibinlakshman
Member
 
Registered: Dec 2008
Location: Kerala, India
Distribution: Ubuntu 11.10
Posts: 334

Rep: Reputation: 33
Cool If its Ubuntu ur using others i dont knw

While booting the system , press esc or any button and give a luk in the grub list , the line ending with kernel is we r going to perform trick

Just follow instructions to edit that line , and end of the line enter this line "init = /bin/bash" , press b to boot frm that line itself

Ubuntu will directly boot in root mode in terminal
Change the password ,
passwd pressenter
New pass enter new
Confirm confirm

OK , let us knw , had it worked
Else u need to have bootable cd , and reset frm their
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding root privaliges to user accounts or auto login as root Val-Ent Linux - General 15 03-02-2010 04:27 PM
How can I have a script owned as root and run as root by a user: setuid? stickey bit? abefroman Linux - Newbie 9 04-19-2008 05:15 PM
On NFS, non-root users can move/rename files belonging to root. Stuart Morrow Linux - Server 2 11-05-2007 11:12 AM
why lftp command run failed when user isn't root, but ok when logining as root steven_yu Linux - Software 0 06-06-2007 08:36 PM
root files: create as root:root or root:wheel? pcass Linux - Security 1 02-07-2004 04:14 PM


All times are GMT -5. The time now is 01:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration