LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 05-30-2014, 08:10 AM   #1
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Rep: Reputation: 38
passwd doesn't prompt for new password on CLFS Sysvinit


Hi,
I just finished building the Sysvinit version of the Cross-LFS book. I'm trying to change the root password, but the passwd utility doesn't prompt me to enter a new one.
Code:
root:/sources# passwd
Changing password for root
It merely displays the above message and exits. Have I missed a step somewhere? Thanks.
 
Old 06-01-2014, 03:09 AM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
I'm trying to change the root password, but the passwd utility doesn't prompt me to enter a new one.
Did root have a password? Does root have a functioning password now?
 
Old 06-01-2014, 07:24 AM   #3
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by dijetlo View Post
Did root have a password? Does root have a functioning password now?
No, I hadn't set a password for root previously, and hence doesn't have one now. I don't think I've ever set the root password during the build process; only after all packages have finished installing. Do you mean after installing shadow? But then, I haven't enabled shadowed passwords.

EDIT: I'm sorry, I should have worded my question properly. I'm trying to "set" a new password for root, not change.

Last edited by corbis_demon; 06-01-2014 at 07:46 AM.
 
Old 06-01-2014, 08:43 AM   #4
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
I'd make that my first step, if you're able. I don't think the SE module in the Linux kernel isn't going to allow root level access without shadow password being enabled.
 
Old 06-01-2014, 12:15 PM   #5
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by dijetlo View Post
I don't think the SE module in the Linux kernel isn't going to allow root level access without shadow password being enabled.
SE module? Isn't that an SELinux utility? Also, I should be able to effect a change from within the chroot, surely, kernel security policies notwithstanding.
 
Old 06-01-2014, 01:30 PM   #6
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
SELinux utility?
No, it a set of kernel level security policies that most of the distros kernels use.
Quote:
I should be able to effect a change from within the chroot
'Let's hope so, because I can't see how you're getting out of this if you can't.
But then again the last time a Slackware zombie faced this problem was back when you had to compile the code from source. EDIT: This actually routinely happens if you upgrade with the wrong architecture by accident and the rare instances shadow password becomes corrupted.
I'm always impressed with the willingness of some folks to compile all that code by hand, can you tell me why someone would use Linux From Scratch? I'm sure it's a great distro and you'd probably learn a lot installing it if you weren't familiar with the configure->make->make-instal->install sequence (which Slackware still uses in many cases BTW), but I know, just from adding packages to a good install, it can be time consuming process and the outcome is by no means guaranteed

Last edited by dijetlo; 06-01-2014 at 01:39 PM.
 
Old 06-03-2014, 05:42 AM   #7
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by dijetlo View Post
No, it a set of kernel level security policies that most of the distros kernels use.
semodule is an SELinux module manager, which is what I thought you were referring to, and your URL carries the search term "selinux module", as well. SELinux support is enabled in many distro kernels, but is not enabled by default in the vanilla kernel (I think). Even if it were enabled, they wouldn't take effect until userspace tools were used to set the policies. And even if such policies had been implemented, I'm building inside a chroot environment, the point of which is to keep the host system's configuration from messing with a clean build. It would be pointless to build the basic tools if the host system were to interfere in the process (Do correct me if I'm wrong, though, becasue I've never worked with SELinux). I may add that my host system doesn't have SELinux enabled.

Quote:
Let's hope so, because I can't see how you're getting out of this if you can't.
But then again the last time a Slackware zombie faced this problem was back when you had to compile the code from source. EDIT: This actually routinely happens if you upgrade with the wrong architecture by accident and the rare instances shadow password becomes corrupted.
I'm always impressed with the willingness of some folks to compile all that code by hand, can you tell me why someone would use Linux From Scratch? I'm sure it's a great distro and you'd probably learn a lot installing it if you weren't familiar with the configure->make->make-instal->install sequence (which Slackware still uses in many cases BTW), but I know, just from adding packages to a good install, it can be time consuming process and the outcome is by no means guaranteed
I have certainly learnt a lot about gnu/linux systems by building C/B/LFS. Compiling from source is actually quite a mundane activity if you are well versed with the process, and have a proper build enviroment set up. That's why I have scripted the process to save time. I also have a package manager and a basic installer which make the task much easier. When I first started out with LFS, of course I had to put in time and effort to get things right, but it was much simpler than actually bootstrapping an OS from scratch, with a bootable hex editor and keying in machine code Most modern distros have accumulated a lot of fat, with an unbelievable number of dependencies, which I wish to avoid. I just run my build script at night, and have a workable system ready when I get up in the morning, so it's not as if I'm spending a lot of time building it.
 
Old 06-03-2014, 08:18 AM   #8
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Well, thanks for telling me that, I always wondered.
Good luck with your 'unable to set root password' problem, you might want to check in the pile of "bloat" you stripped out for the answer.
 
Old 06-03-2014, 11:57 AM   #9
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Original Poster
Rep: Reputation: 38
I did find the answer to my problem; an errant CFLAG in my build script, which enabled strong buffer protection. Thank you for your replies, though. Hope you enjoyed your snark with a pile of "bloat". I hope it was "testy".
 
  


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
F1-F6 console doesn't prompt for user/password gagou7 Linux - Newbie 9 04-24-2011 06:56 AM
passwd command doesn't recognize valid password davidstvz Linux - Software 1 11-23-2010 05:43 PM
call useradd and passwd through no prompt script Red Squirrel Linux - Server 5 01-07-2009 01:33 AM
Prompt 4 passwd change after every 3 months varunkant Linux - Security 6 11-26-2008 07:09 PM
passwd prompts for new password only once when a short password is entered powah Linux - Security 0 09-19-2007 04:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

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