LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-06-2008, 10:50 AM   #1
xcorsary
Member
 
Registered: Mar 2008
Location: Medellin - Colombia
Distribution: kubuntu
Posts: 31

Rep: Reputation: 15
no comands (shotdown, fdisk) executable with root (fedora8, kde 3.5)


hi again!

i have been trying to use the shutdown and the fdisk command under root but it doesnt work...

Quote:
bash: fdisk: command not found
but when i type man shutdown the manual will appear.

any help?

tkx
 
Old 04-06-2008, 10:52 AM   #2
beadyallen
Member
 
Registered: Mar 2008
Location: UK
Distribution: Fedora, Gentoo
Posts: 209

Rep: Reputation: 36
You've probably just run 'su' to log in as root. This doesn't read the bash profile settings in the /root directory. Use 'su -' instead, and you'll log in a a proper root (i.e. with /sbin and /usr/sbin in your path).
 
Old 04-06-2008, 12:00 PM   #3
Samotnik
Member
 
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
Check PATH variable, if there are all of bin directories.
 
Old 04-06-2008, 12:35 PM   #4
xcorsary
Member
 
Registered: Mar 2008
Location: Medellin - Colombia
Distribution: kubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
tks a lot guys!!! it worked with the su -!
but in case you have time, can you explain me why did i have to use the su - and not just su?

again, tkx a lot!


mk
 
Old 04-07-2008, 01:45 AM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
See post #2 and #3; with su.

The environment is not set to that of the new user. Therefore you don't have the PATH variable set to include certain directories and hence the programs can not be found. With su -, the environment is set to that of the new user.
 
  


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
system said the our root password failure when I use ssh to connect Fedora8 vvcat Linux - Security 1 03-03-2008 01:21 PM
Konsole Root Login Fail after Executable Moved eightysixme Linux - Security 4 01-03-2005 11:27 PM
doing simple comands during startup e1000 Slackware 1 11-11-2003 06:29 PM
RH9 hanging on shotdown (pcmcia) h.kuffner Red Hat 0 09-16-2003 08:13 AM
comands vicente Linux - General 5 10-02-2001 04:05 PM


All times are GMT -5. The time now is 04:21 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration