LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-20-2013, 09:57 AM   #1
keithostertag
Member
 
Registered: Jul 2011
Location: Harrisburg, PA
Posts: 127

Rep: Reputation: Disabled
New install- no root password! init=/bin/bash crashes!


Just finished a new install of Debian Wheezy via netinstall, minimal install, no DE or even wm's yet. 3.2.04-amd64.

Everything seemed to go well, and I can login with my user name.

However, the system doesn't recognize the root password that I gave it during the install.

This has happened to me before in the past, and I have used this procedure to change the root password:

Get to GRUB screen
Press e to edit
add "init=/bin/bash" to end of the kernel line
ctrl-x to reboot
from there I would mount -rw -o remount / then passwd, etc...

That has worked in the past. This time I get:

Code:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
root@(none):/#
Then nothing. No response to any keyboard entry. Crashed?

I've googled around, and lots of posts regarding similar but nothing helpful so far.

Can you help?

Thanks,
Keith Ostertag
 
Old 02-20-2013, 10:12 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Sounds like there's something up with /dev/console . What about booting from a live CD?
 
Old 02-20-2013, 10:21 AM   #3
keithostertag
Member
 
Registered: Jul 2011
Location: Harrisburg, PA
Posts: 127

Original Poster
Rep: Reputation: Disabled
Hi- thanks for responding. Boot from live CD, then what? chroot, then able to use passwd? Could you detail? I've never actually used chroot before... Not sure which live CD's I have, would it work if I use a Ubuntu live cd?

Keith
 
Old 02-20-2013, 10:29 AM   #4
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Any live CD should do. Mount your disk (I assume you know which partition and what format) and

a) edit /mnt/etc/shadow to your choice
You can get an old-style passwd hash by
Code:
perl -e 'print crypt("passhere","ab"), "\n"'
or

b) chroot to /mnt and run passwd
 
1 members found this post helpful.
Old 02-20-2013, 11:13 AM   #5
keithostertag
Member
 
Registered: Jul 2011
Location: Harrisburg, PA
Posts: 127

Original Poster
Rep: Reputation: Disabled
OK, thanks, that worked.

I first tired a Trinity Rescue Disk, and that didn't work- I got an error saying "chroot: cannot run comand "/bin/bash": exec format error". That looked ominous, but then I tried an old Ubuntu I had around. Got a terminal, mounted my root partition, chroot then ran passwd. Now I am back in business with a root password, configuring.

I don't use shadow passwords, and really don't know anything about perl.

Thanks linosaurusroot!

Keith Ostertag
 
  


Reply



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
shutting down after init=/bin/bash michapma Linux - General 5 10-28-2017 07:16 PM
[SOLVED] How to change from /sbin/sh to /bin/bash for 'root'? thomas2004ch Solaris / OpenSolaris 2 02-20-2011 04:32 AM
/usr/bin/mysqladmin -u root -h yourhostname.yourdomain.com password 'new-password'? adred Linux - Server 2 03-14-2010 05:24 AM
/bin/bash: root: command not found pridefc Red Hat 5 12-12-2006 07:09 PM
why did bash 2.05b install delete /bin/bash & "/bin/sh -> bash"? johnpipe Linux - Software 2 06-06-2004 06:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 03:01 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
Open Source Consulting | Domain Registration