LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-07-2015, 08:57 AM   #1
slappisMekaniker
Member
 
Registered: Nov 2013
Location: The Blue planet
Distribution: Slackware 14.0
Posts: 64

Rep: Reputation: 6
Question What happened with root commands?


It was a quite long smooth run of my slackware for almost two years, with stock Linux kernel and later before 3 or 4 months with Linux-3.18.1-smp with no faults or crash so far.

I was wondering to configuring root's window manager and appearance.

What exactly I did..
1. edited vifmrc(filemanager),
2. vimrc,
3. echinusrc(echinus wm)
4. add some theme files to /usr/share/themes
5. and at last edited .Xresources and .zshrc file
to add some eye-candy..

Now, there was a power-cut and i couldn't able to do clean shutdown(usually i issue halt command to do so)

When power was back, bootup was good and okay but the problem is (screenshot attached) is
1. logged in, did su and issued pkgtool command to which output was "command not found"
2. and issued halt command which was weird that it simply changed the directory from ~ to /sbin
(but shutdown -h now or shutdown -r works good)

What I tried..
Just googled regarding my problem and i tried reinstalling pkgtool package with boot cd but it was no use.. I am not sure what went wrong please give the respective tips or links so that i can figure out what happened.
Attached Thumbnails
Click image for larger version

Name:	pkgtool.png
Views:	75
Size:	3.4 KB
ID:	20237   Click image for larger version

Name:	haltproblem.png
Views:	67
Size:	3.2 KB
ID:	20238  
 
Old 12-07-2015, 09:15 AM   #2
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 238Reputation: 238Reputation: 238
Maybe because of the powercut something got mangled and root is no longer recognized as root.

What happens if you try bash? (you edited the .zshrc file, maybe that needs removing/repairing)
Is the halt (or pkgtool) command still there? And does it work? I.e. as root try 'which' <command> and then try to run them with the full path.
What happens in runlevel 3 (before startx) and you login as root. Does pkgtool and halt as commands still work?
 
1 members found this post helpful.
Old 12-07-2015, 09:29 AM   #3
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
Most likely you don't have /sbin in your $PATH and it has nothing to do with the power failure.

Last edited by GazL; 12-07-2015 at 09:31 AM.
 
1 members found this post helpful.
Old 12-07-2015, 09:46 AM   #4
slappisMekaniker
Member
 
Registered: Nov 2013
Location: The Blue planet
Distribution: Slackware 14.0
Posts: 64

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by brobr View Post
Maybe because of the powercut something got mangled and root is no longer recognized as root.

What happens if you try bash? (you edited the .zshrc file, maybe that needs removing/repairing)
Is the halt (or pkgtool) command still there? And does it work? I.e. as root try 'which' <command> and then try to run them with the full path.
What happens in runlevel 3 (before startx) and you login as root. Does pkgtool and halt as commands still work?
@brobr

And yeah bash results same thing also the same when before startx and also with logged in separately with root,
[CODE]> whereis pkgtool
pkgtool: /sbin/pkgtool ./pkgtool.png /usr/man/man8/pkgtool.8.gz /usr/share/man/man8/pkgtool.8.gz /usr/X11/man/man8/pkgtool.8.gz

> whereis halt
halt: /sbin/halt /usr/man/man8/halt.8.gz /usr/share/man/man8/halt.8.gz /usr/X11/man/man8/halt.8.gz



@GazL
That was a good observation.. I am now working on it..

Last edited by slappisMekaniker; 12-07-2015 at 09:56 AM. Reason: misuderstood..
 
Old 12-07-2015, 10:17 AM   #5
slappisMekaniker
Member
 
Registered: Nov 2013
Location: The Blue planet
Distribution: Slackware 14.0
Posts: 64

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by GazL View Post
Most likely you don't have /sbin in your $PATH and it has nothing to do with the power failure.

Good observation GazL... I solved the problem.. and yes it has nothing to do with power-failure.

and as stated by @brobr
Quote:
What happens if you try bash? (you edited the .zshrc file, maybe that needs removing/repairing
the problem was with .zshrc file..
and i found this thread was helpful http://www.linuxquestions.org/questions/linux-newbie-8/as-root-not-seeing-sbin-and-usr-sbin-in-path-174427/

yeah.. Here is what i did..
1. checked the /etc/profile for any corruption or change.. and found that root should use /usr/local/sbin .
2. which was missing in the .zshrc file with the export PATH="..."
3. so i added /usr/local/sbin to that line and sourced the .zshrc file.
4. But nothing happened and then i added /sbin to the same line and voila problem solved as when i issued pkgtool command it popped up!!

Thanks for your quick reply!
Thread solved!
 
Old 12-07-2015, 11:52 AM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by slappisMekaniker View Post
3. so i added /usr/local/sbin to that line and sourced the .zshrc file.
4. But nothing happened and then i added /sbin to the same line and voila problem solved as when i issued pkgtool command it popped up!!
Make sure you also have /usr/sbin included as that has a number of additional programs located there.
 
1 members found this post helpful.
Old 12-10-2015, 09:16 AM   #7
slappisMekaniker
Member
 
Registered: Nov 2013
Location: The Blue planet
Distribution: Slackware 14.0
Posts: 64

Original Poster
Rep: Reputation: 6
Sure bro!
 
  


Reply

Tags
halt, pkgtool, root, shutdown



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
[SOLVED] Running Java program as Root (sudo) - Root Commands? derekpock Programming 3 07-27-2013 11:00 AM
What happened to my root user scharsky Linux - Newbie 4 07-07-2011 06:41 PM
[SOLVED] How to allow access to some commands having root privleges to be run bu non root user suryashikha Linux - Newbie 8 10-31-2009 01:05 PM
running X apps as root-what happened to xhost cuk Slackware 2 04-04-2007 05:29 AM
bash-2.04#? what happened to root@localhost gummyworms Linux - General 2 07-12-2001 10:47 AM

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

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