[K12OSN] Re: The "can't log in as root to fix the 'can't log, in as root'" conundrum -Fixed Itself?!

Carl Keil carl at snarlnet.com
Thu Jan 8 04:00:07 UTC 2009


> > David Hopkins wrote:>
>> >     Can you just use "su root" to get root ownership in a terminal session
>> >     after logging in with your normal account?  I normally use su - root
>> >     to get the full login environment, but su root should give you root
>> >     privileges, right?
>>     
>> > Yes, as will a plain "su". The dash argument to su means "execute my 
>> > start-up scripts and set up my environment." Without the dash, you 
>> > don't get that, meaning you also won't have root's path variable set. 
>> > That means you'll hafta specify the path to things like /sbin/ifconfig 
>> > (and other commands). The other argument to su is the username. 
>> > Without a username specified, su assumes you mean root. 
>>     
>
> Thank you so much.  "su - root" didn't work, so I gave up on the whole 
> su thing.  I was hoping there was a simple fix. 
>
> Can I ask?  What do you think the best actual fix for the original 
> problem is?
>
> 1)  mv /root /home/
> 2) ln -s /root /home/root
> 3) cp -a /root /home/
> 4) vi /etc/passwd
> 5) other... please explain
>   

So, I went in today to take another crack at fixing my missing /root 
folder and there was no problem.  I could log in as root fine with no 
error messages.  While I'm happy that my server is supposedly fine now, 
I'm even more flumoxxed about what the problem is. 

Does anyone have a guess about why my computer might be missing a 
/home/root folder on one bootup and then not on another?  I'd rather 
have a consistent problem than an intermittant one.

Two other pieces of possibly relevant info:
1) This server has a failing hard drive in the raid array.  I'm getting 
a message from smartd that says I have unrecoverable sectors.  I'm going 
to swap that out tomorrow.  The RAID has /home on it and nothing else.
2) The server has done something similar before, but only with trying to 
log in and get LDAP/home from a client.  And that was fixed each time 
with a reboot on the client.  I chalked that up to trying to log in on a 
client before the server had finished booting up.  (I'm still developing 
this.)

Any thoughts?

Thank you so much.

ck




More information about the K12OSN mailing list