LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 02:41 AM   #1
palisetty_suman
Member
 
Registered: Feb 2007
Location: TX, USA
Distribution: fedora
Posts: 191

Rep: Reputation: 33
root passowrd


what is the command to change the root password
 
Old 02-14-2009, 02:42 AM   #2
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
you'll need to be root to do it, but it's the same for all users..

passwd

... works for current user

or passwd <user>

... for a specific user.

Last edited by JulianTosh; 02-14-2009 at 02:43 AM.
 
Old 02-14-2009, 03:03 AM   #3
palisetty_suman
Member
 
Registered: Feb 2007
Location: TX, USA
Distribution: fedora
Posts: 191

Original Poster
Rep: Reputation: 33
Question root password

Thanks for that case. But if u take a different scenario, i am a normal user and suppose i forgot the root password, so i want to get a new root password what is the COMMAND for it
 
Old 02-14-2009, 03:10 AM   #4
thierrys
LQ Newbie
 
Registered: Feb 2009
Distribution: RedHat, Fedora, CentOS
Posts: 27

Rep: Reputation: 18
There is no such thing as a command fr it since we do not know the circumstances.
which distribution are you using, is it a physically accessible machine etc.

Give some backgroud first so the appropriate procedure can be pointed out

thx
Thierry
 
Old 02-14-2009, 03:19 AM   #5
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
The command is still the same but the procedure is different since you will have to have physical access to the machine and reboot it.

But like thierrys says, we'll need to know more about the installation to help with that procedure.
 
Old 02-14-2009, 04:07 AM   #6
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Yah!
We don't just spill the beans around here. But there is/was an article on Youtube that I never looked at because of the dialup issue.
What if you had ill intensions, I wouldn't want to be responsible, but then again, you don't know me from a hole in the ground.
 
Old 02-14-2009, 04:14 AM   #7
palisetty_suman
Member
 
Registered: Feb 2007
Location: TX, USA
Distribution: fedora
Posts: 191

Original Poster
Rep: Reputation: 33
Unhappy Root password

Hi my friends,
I am system administrator under training.
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. He wants me to set a new password or recover the old password, how would i do it? Is there any command or procedure for it?
 
Old 02-14-2009, 04:49 AM   #8
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
sigh.
 
Old 02-14-2009, 04:53 AM   #9
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
 
Old 02-14-2009, 06:08 AM   #10
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 5.4, Mac OS 10.4 (tiger)
Posts: 1,005

Rep: Reputation: 79
Also wouldn't it also matter if he has "SUDO" rights, you only need to go into single user mode if you have no super user access... if you have sudo rights you can reset root with "sudo passwd root", else it's the single user mode way. As far as it goes, any OS is not too hard to reset passwords on if their is physical access, just most people don't know how to do it... also the effects are in most cases, plain as day. Nothing is more dangerous then physical access... something to remember.
 
Old 02-14-2009, 06:58 AM   #11
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
Quote:
Originally Posted by r3sistance View Post
if you have sudo rights you can reset root with "sudo passwd root"
Only if you've managed to seriously screw up you sudoers file. Sorry, but this is a pet peive of mine so I'm going to get back up on my soapbox for this issue once again today.

<soapbox>

'sudo' is not meant to be an alternative to 'su'. It's purpose is to allow a non-root user access to a very specific set of commands that need to be run as root.

Allowing users to sudo all commands and, especially, run shells, is a very very bad thing.

</soapbox>
 
Old 02-14-2009, 07:07 AM   #12
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 5.4, Mac OS 10.4 (tiger)
Posts: 1,005

Rep: Reputation: 79
Sudo is safer then su, Sudo automatically logs you out of super user privilages after 15 minutes where su does not. You shouldn't really directly login as root or allow su on any machine where someone other then you can access it, I work in a datacenter with other technicians so I have to use sudo, as to not expose my own personal server should I leave it open to handle any work.
 
Old 02-14-2009, 07:10 AM   #13
thierrys
LQ Newbie
 
Registered: Feb 2009
Distribution: RedHat, Fedora, CentOS
Posts: 27

Rep: Reputation: 18
+1 for the Admiral

for the OP, giving student root - why the hell would you want to do that?
 
Old 02-14-2009, 10:54 AM   #14
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 5.4, Mac OS 10.4 (tiger)
Posts: 1,005

Rep: Reputation: 79
Meh, Sudo is just way more secure so I'll countine to use it over su, AOL CDs were not meant to replace coasters, but hey they do the job!

Anyways, the OP never stated it was actually his computer, for all we know the student could be using their own machine... or it could be a training lab... it's hardly something to say "why the hell" over, their are valid possibilities.
 
Old 02-14-2009, 10:56 AM   #15
palisetty_suman
Member
 
Registered: Feb 2007
Location: TX, USA
Distribution: fedora
Posts: 191

Original Poster
Rep: Reputation: 33
Unhappy R3sistance

I am not satisfied with the answer my friends gae it to me. Being a site with loads of system administrators, nobody could answer a simple question.
Regarding r3sistance, sir if the user's name is not in sudoer's file then its not possible for me to use the sudo command. What's the alternative.
 
  


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 05: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 06:15 PM
On NFS, non-root users can move/rename files belonging to root. Stuart Morrow Linux - Server 2 11-05-2007 12:12 PM
why lftp command run failed when user isn't root, but ok when logining as root steven_yu Linux - Software 0 06-06-2007 09:36 PM
root files: create as root:root or root:wheel? pcass Linux - Security 1 02-07-2004 05:14 PM


All times are GMT -5. The time now is 06:40 PM.

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