LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 01-16-2009, 09:21 PM   #1
Junko77
Member
 
Registered: Dec 2008
Distribution: Xubuntu 8.10
Posts: 30

Rep: Reputation: 15
Enabling the Root Account


I know this is an extremely noobish question but when I try to change my root passwd, it doesn't ask me to type the new password it just says password updated successfully. From what i see the my normal user password and my root password are the same....although I don't think that's possible. Any ideas?
 
Old 01-16-2009, 09:27 PM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

Code:
Excerpt from 'man passwd'
PASSWD(1)                                                            

NAME
       passwd - change user password

SYNOPSIS
       passwd [name]
       passwd [-x max] [-n min] [-w warn] [-i inact] login
       passwd {-l|-u|-d|-S|-e} login

DESCRIPTION
       passwd  changes  passwords  for  user accounts.  A normal user may only
       change the password for his/her own account, the super user may  change
       the password for any account.

   Password Changes
       The user is first prompted for his/her old password, if one is present.
       This password is then encrypted and compared against the  stored  pass-
       word.  The user has only one chance to enter the correct password.  The
       super user is permitted to bypass this step so that forgotten passwords
       may be changed.

       After  the  password  has  been  entered, password aging information is
       checked to see if the user is permitted to change the password at  this
       time.  If not, passwd refuses to change the password and exits.

       The user is then prompted for a replacement password.  This password is
       tested for complexity.  As a general guideline, passwords  should  con-
       sist  of 6 to 8 characters including one or more from each of following
       sets:
As root you can change anyone's password.
 
Old 01-17-2009, 10:18 AM   #3
Junko77
Member
 
Registered: Dec 2008
Distribution: Xubuntu 8.10
Posts: 30

Original Poster
Rep: Reputation: 15
thanks for replying onebuck, but how am i supposed to logon as root if I don't have a root passwd? I tried sudo...it doesn't work.
 
Old 01-17-2009, 10:26 AM   #4
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
Hi Junko77,

Could'nt quite figure out what you are doing. Are you able to log in as a non-root user?

If this is not a live cd (wild imagination) and linux is on your hard drive the best option is to boot in single user mode and change the root password.
 
Old 01-17-2009, 10:46 AM   #5
Fred Caro
Member
 
Registered: May 2007
Posts: 999

Rep: Reputation: 166Reputation: 166
junko pword

Is it the case you are a single user on an Ubuntu type event, then the setup I've come across leaves you with the same pword for the user as the root user, except it will not access root files unless you retype your pword.

Fred.
 
Old 01-17-2009, 10:50 AM   #6
Junko77
Member
 
Registered: Dec 2008
Distribution: Xubuntu 8.10
Posts: 30

Original Poster
Rep: Reputation: 15
thanks fred and silverbuck, i think you guys get what i'm saying the single user passwd and the root passwd are the same. Can you explain how to access root files (wihtout using terminal) more clearly and also how to change the root passwd? silverbuck, how do i change the root passwd when i'm logged on as a single user.

Last edited by Junko77; 01-17-2009 at 10:53 AM.
 
Old 01-17-2009, 11:02 AM   #7
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
Might try
Code:
sudo passwd su
which will create a password for "su'
Then at the $ prompt, type "su" and enter the password and the prompt will change to #. At that point you are "Root". At least, it seems to work that way for me on ubuntu 7.10
Good Luck

Last edited by john test; 01-17-2009 at 11:03 AM.
 
Old 01-17-2009, 12:47 PM   #8
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
Might try
Code:

sudo passwd su
I think you mean:
Code:
sudo passwd root
 
Old 01-18-2009, 01:44 AM   #9
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
Root account ....

Quote:
Originally Posted by tredegar View Post
I think you mean:
Code:
sudo passwd root
Yeah that will help you change the password.

BTW what distro are you using ? Please mention it in your profile so that we have an idea of what screens you are actually seeing . Also I still did not get what you are doing !
 
Old 01-18-2009, 09:01 AM   #10
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,
Quote:
Originally Posted by Junko77 View Post
thanks for replying onebuck, but how am i supposed to logon as root if I don't have a root passwd? I tried sudo...it doesn't work.
You could just boot with a 'LiveCD'.

The easiest way would be to use the install cd/dvd to boot the system as if you were going to install.

After you get to the login then from the cli (command line);

Code:
~#mkdir /systemp                   #temporary mount point
~#mount /dev/your_device /systemp  #this is the device you installed to
~#chroot /systemp                  #change to yours
~#cd /systemp/etc                  #change to directory
~#man passwd                       #read the man passwd or perform
                                   #desired action
Code:
excerpt from 'man PASSWD'                                                            PASSWD(1)

NAME
       passwd - change user password

SYNOPSIS
       passwd [name]
       passwd [-x max] [-n min] [-w warn] [-i inact] login
       passwd {-l|-u|-d|-S|-e} login

DESCRIPTION
       passwd  changes  passwords  for  user accounts.  A normal user may only
       change the password for his/her own account, the super user may  change
       the password for any account.
Once you have the root filesystem mounted you can make changes to your system. You could edit the '/etc/passwd' file or change the passwd for the desired account. Once you have performed the desired maintenance then you should now be able to re-boot your system.

Last edited by onebuck; 01-18-2009 at 12:20 PM. Reason: grammar
 
Old 01-18-2009, 09:26 AM   #11
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
If you are running a distro that uses sudo, and it seems you are [Please tell us your distro!] then this (see code below) is how to become root (assuming you have admin rights, which you will have by default if, and only if, you are the user who installed the system. If you are not the user who installed the system, then you'll have to ask that user to make your username a member of the group admin before sudo will work)

Code:
sudo -i
Give your password
Now you are root.

If you want to set a password for root, do it like this (again, assuming you have admin rights)

Code:
sudo passwd root
First give your password, to allow the passwd root command to be run
Then give root's new password (twice, and both must match)

Once you have set a password for root, you can login as root, and be root from the word go.

If you haven't set a password for root, you can only become root by first logging in as yourself, and then using the sudo -i code I gave above.

Hope this makes sense.
 
Old 01-18-2009, 10:01 AM   #12
Lord Xeb
Member
 
Registered: Nov 2008
Location: Ohio, USA
Distribution: Ubuntu 8.10 (I always update)
Posts: 34

Rep: Reputation: 15
What linux are you using itn willn help us all trying to help you. Each disto is different bin its own way. Any of the more complex version like arch or gentoo has a different way of accessing and changing root. Or at least from
What I have are. What I do for accessing files in root is that I use a script called rootilus

I will post later once I have access to my laptop
 
Old 01-18-2009, 04:36 PM   #13
Junko77
Member
 
Registered: Dec 2008
Distribution: Xubuntu 8.10
Posts: 30

Original Poster
Rep: Reputation: 15
i'm running xubuntu 8.10
 
Old 01-18-2009, 05:36 PM   #14
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
i'm running xubuntu 8.10
Thank you for this useful information (at last).
Meanwhile, have you bothered to read the above SIX posts of advice and guidance?
If not, please do so now.
If you have, how do you think your reply of
Quote:
i'm running xubuntu 8.10
helps us help you?
 
  


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
root account or user account arodlinux SUSE / openSUSE 3 12-23-2008 09:59 PM
root-owned file is able to be deleted with my non-root account win32sux Linux - Security 3 11-18-2008 03:00 AM
Why is my common account can't open Terminal in XFCE4 but root account? notsay Slackware 4 08-19-2007 12:29 AM
Identifying non-administrators w/ root privilege/ Multiple root account in use wjeanpaul Linux - Security 4 05-19-2006 09:55 PM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 11:02 AM


All times are GMT -5. The time now is 10:38 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