LinuxQuestions.org
Review your favorite Linux distribution.
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 04-03-2015, 09:53 AM   #1
Ragnarok Warrior
Member
 
Registered: Nov 2005
Location: Bangor, ME
Distribution: Debian,Ubuntu,DSL
Posts: 87

Rep: Reputation: 18
su login segfault


Just finished BLFS Chapter 3: Bash shell startup files. I can login as root or as user with no issues, however from user when I issue # su , it prompts me for my password (which I enter correctly) and hangs for about a minute then segfaults. I can escape while it hangs with ctrl+c and it will enter super user but with the generic " -bash-4.3# " prompt.

EDIT: I removed everything from that section (profile profile.d and /etc/skel) and su no longer segfaults.

Last edited by Ragnarok Warrior; 04-03-2015 at 10:14 AM.
 
Old 04-03-2015, 11:53 PM   #2
timothydanielson
LQ Newbie
 
Registered: Sep 2014
Location: Twin Cities, Minnesota
Distribution: Debian 7.6 + ; KDE 4.8.4 + (I started there), PureOS 7 + KDE
Posts: 24

Rep: Reputation: Disabled
Question

Quote:
Originally Posted by Ragnarok Warrior View Post
Just finished BLFS Chapter 3: Bash shell startup files. I can login as root or as user with no issues, however from user when I issue # su , it prompts me for my password (which I enter correctly) and hangs for about a minute then segfaults. I can escape while it hangs with ctrl+c and it will enter super user ...
I have a couple questions, a) perhaps I'm incorrect, but I thought "su" stood for "switch user"? I believe root is just another user... one with FAR more permissions. b) I do want to make sure you aren't confusing 'su' with its safer cousin 'sudo' and are in fact entering the Root for SU and YOURs for SUDO. Which command, which password are you entering? What you entered# su makes no sense to me unless you are becoming a user other than root or your standard user account. Why are you switching user as root?
 
Old 04-15-2015, 10:50 AM   #3
Ragnarok Warrior
Member
 
Registered: Nov 2005
Location: Bangor, ME
Distribution: Debian,Ubuntu,DSL
Posts: 87

Original Poster
Rep: Reputation: 18
Alright, brother's 21st last weekend and completely forgot about my question.

Sorry for the confusion, forgot some syntax: technically what I should have written in my post was $ su not # su

Having not installed the sudo package yet, su is how I enter root for whatever I need root permissions for. Although I solved the problem, I'll rephrase my question a little bit to clarify. When the computer first started and I was prompted for login, I could log in using either my user account or the root account and had no issues. The issue stemmed from using the su command within the user environment, for example: start computer - log in as ragnarok (user) - need root for something - use su to switch to root and that is when the segfault would happen (also happened when # su ragnarok if logged in as root.)

Still haven't figured out all of the specifics, but I had left an "EOF" at the end of /etc/bashrc in the chapter (copy paste mistake) Looked at my files' code for a while, even overlooking the "EOF" at the end of the file not really thinking. Would have figured a syntax error output not an outright segfault. Re-did all of the bash section an all is right with the world.

Last edited by Ragnarok Warrior; 04-16-2015 at 12:33 PM.
 
Old 04-15-2015, 11:31 AM   #4
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
People here say sudo is more good than su. But I say su has more good security record than sudo. I prefer su for all root tasks.

Also using PAM is good choice together with su.
 
Old 04-15-2015, 03:34 PM   #5
Ragnarok Warrior
Member
 
Registered: Nov 2005
Location: Bangor, ME
Distribution: Debian,Ubuntu,DSL
Posts: 87

Original Poster
Rep: Reputation: 18
Yeah, I'm still reading up on PAM and deciding wether or not I will compile and install it.
 
  


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
segfault sobah Linux - Newbie 5 08-15-2013 09:50 AM
Thunderbird segfault gillmt Linux - Software 1 01-04-2011 03:45 PM
Segfault in libc thenob Slackware 1 02-19-2009 11:24 AM
segfault prob in C zaichik Programming 5 01-25-2005 07:00 AM
MEncoder segfault Hammett Linux - Software 0 11-01-2003 07:13 AM

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

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