LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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-13-2015, 12:39 PM   #1
mrjenskay
LQ Newbie
 
Registered: Jan 2015
Location: Anywere (The NSA Knows That)
Distribution: Elementary OS , Debian , Ubuntu , Linux Mint , Lubuntu , Arch , Red Hat , Scientific Linux , Zorin
Posts: 7

Rep: Reputation: Disabled
Question Password Problems [Elementary OS Luna]


Hello everyone,

I am not a real n00b at linux but this question is kinda newbisch: I disabled a password for my profile and now i am trying to use sudo but I'm asked to enter a password. I have tried any possible password but I can't unlock it. Please Help!

I own a brandless PC with an Intel Celeron 3.06Ghz processor.
An Intel motherboard
The OS on this PC is Elementary OS Luna

Again please help me.

Very Kind Regards,
mrjenskay

Last edited by mrjenskay; 01-13-2015 at 02:02 PM.
 
Old 01-13-2015, 12:56 PM   #2
Rubian
Member
 
Registered: Dec 2013
Distribution: Arch Linux
Posts: 116

Rep: Reputation: 18
What is the command you are trying to enter?
 
Old 01-13-2015, 01:50 PM   #3
mrjenskay
LQ Newbie
 
Registered: Jan 2015
Location: Anywere (The NSA Knows That)
Distribution: Elementary OS , Debian , Ubuntu , Linux Mint , Lubuntu , Arch , Red Hat , Scientific Linux , Zorin
Posts: 7

Original Poster
Rep: Reputation: Disabled
Any sudo command,
sudo su, sudo apt-get install, sudo gedit, etc.

Last edited by mrjenskay; 01-13-2015 at 02:01 PM.
 
Old 01-13-2015, 02:05 PM   #4
Rubian
Member
 
Registered: Dec 2013
Distribution: Arch Linux
Posts: 116

Rep: Reputation: 18
And after you type your password, what does it say?
 
Old 01-13-2015, 02:12 PM   #5
mrjenskay
LQ Newbie
 
Registered: Jan 2015
Location: Anywere (The NSA Knows That)
Distribution: Elementary OS , Debian , Ubuntu , Linux Mint , Lubuntu , Arch , Red Hat , Scientific Linux , Zorin
Posts: 7

Original Poster
Rep: Reputation: Disabled
it says: "Sorry, try again."
and starts again
 
Old 01-13-2015, 02:15 PM   #6
Rubian
Member
 
Registered: Dec 2013
Distribution: Arch Linux
Posts: 116

Rep: Reputation: 18
It should be the password you chose when you install the OS.
 
Old 01-13-2015, 02:19 PM   #7
vincix
Member
 
Registered: Feb 2011
Distribution: Centos 6.7, 7
Posts: 556

Rep: Reputation: 52
Quote:
Originally Posted by mrjenskay View Post
Hello everyone,

I am not a real n00b at linux but this question is kinda newbisch: I disabled a password for my profile and now i am trying to use sudo but I'm asked to enter a password. I have tried any possible password but I can't unlock it. Please Help!

I own a brandless PC with an Intel Celeron 3.06Ghz processor.
An Intel motherboard
The OS on this PC is Elementary OS Luna

Again please help me.

Very Kind Regards,
mrjenskay
What do you mean by disabling the password for your profile? And what do you mean by profile? You mean simply to say user? How did you actually disable it? Did you actually insert an ! in /etc/shadow or what did you do exactly?
 
Old 01-13-2015, 03:10 PM   #8
mrjenskay
LQ Newbie
 
Registered: Jan 2015
Location: Anywere (The NSA Knows That)
Distribution: Elementary OS , Debian , Ubuntu , Linux Mint , Lubuntu , Arch , Red Hat , Scientific Linux , Zorin
Posts: 7

Original Poster
Rep: Reputation: Disabled
Dear Rubian,
I previously said that i tried every possible password including my install password.

Dear vincix,
With disabling the password for my profile i do mean for my user account.
I did this by going to the system settings> user accounts > Password> disable


Kind Regards,
mrjenskay
 
Old 01-13-2015, 05:46 PM   #9
vincix
Member
 
Registered: Feb 2011
Distribution: Centos 6.7, 7
Posts: 556

Rep: Reputation: 52
Quote:
Originally Posted by mrjenskay View Post
Dear vincix,
With disabling the password for my profile i do mean for my user account.
I did this by going to the system settings> user accounts > Password> disable
There might be some other more elegant solutions to this, but one solution would be to change the root password (and implicitly to create it, because on ubuntu-based distros there's no access to root by default, except with sudo). You can do that by pressing 'e' in Grub (before it boots). Search for the kernel line (the one with vmlinuz) and at the end append "/init/bash" then press ctrl+x.
This will take you to a console where you'll need to find the root partition of your elemenetary OS.
You can find this by fdisk -l (if you don't have windows installed or any other operating system, this should be simple)
Once you've identified it, you need to change the root.
Code:
# chroot /dev/sdXY
(first one is a letter - it identifies the hdd, the second one is a number, it identifies the partition number)
Now you need to remount your partition in order to have read-write access to your partition, so enter:
Code:
# mount -n -t remount,rw /
(it simply remounts the partition of your operating system, so for that you need to specify /, the root path)
OK, once here you can simply change the password by typing passwd directly or, if you don't want to activate root, I think it might work changing the password of your username directly, so type:
Code:
passwd user
Enter your new password, restart and the OS will boot normally (what you will have changed in Grub only applies to that particular session, there's no permanent change).

Last edited by vincix; 01-13-2015 at 05:50 PM.
 
  


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
Elementary OS Luna boots to terminal jaken Linux - Newbie 14 01-19-2014 07:58 PM
LXer: 7 Things I like about Elementary OS Luna | Luna Review LXer Syndicated Linux News 0 09-03-2013 11:31 AM
LXer: Elementary OS 0.2 “Luna” review LXer Syndicated Linux News 0 08-20-2013 08:50 PM
LXer: Elementary OS Luna preview LXer Syndicated Linux News 0 11-15-2012 06:10 AM


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