LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-22-2004, 01:18 AM   #1
zwyrbla
Member
 
Registered: Aug 2004
Location: MA
Distribution: Slack 10.1
Posts: 107

Rep: Reputation: 15
Cannot run basic commands unless Im logged on as root


Ive noticed I cannot run anything except startx unless im logged on as root I cannot even use shutdown or poweroff how do I fix this?
 
Old 08-22-2004, 01:37 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Commands that change the state of the machine (e.g. powering it off) are typiucally restricted to root. Commands liks listing files/directories, creating text files in your home directory, etc. should work fine.
 
Old 08-22-2004, 01:39 AM   #3
jax8
Member
 
Registered: Feb 2004
Location: Australia
Distribution: Ubuntu, Fedora 10
Posts: 632

Rep: Reputation: 31
thats probably because these command are not in you $PATH

try

/sbin/shutdown

you will probably have to use the absolute path for these sorts of things.

You can however change you /etc/profile and add and export command with the directories you want to add to you path, or you can add it to your .bashrc file I think.
 
Old 08-22-2004, 01:49 AM   #4
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480 N, 95.3690 W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 46
You can create a group and name it something like shutdown. Add any users you want to use those commands to that group and then change the group ownership on those commands.
 
Old 08-22-2004, 08:20 AM   #5
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
This may or may not be of any help, but here it is anyway:
I have a Mandrake 10 system, and I can enter the following commands, as a normal unpriviledged user, and it gets the desired result:

halt
reboot
 
  


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
How a ordinary user can run commands having only root privilige in C? shivaligupta Programming 1 01-31-2005 05:24 AM
Suse Pro Can't run 3D as normal, only logged in as root Used to work. What did I do? Min Donner Linux - Laptop and Netbook 3 05-06-2004 12:14 PM
kde much slower to start when logged in as alan than logged in as root arubin Slackware 0 04-26-2004 05:27 PM
Unable to run xfree86 unless logged in as root kdepa Linux - Security 9 02-28-2004 04:58 PM
mozilla works fine when logged in as a user but crashes when logged in as root jimi Linux - General 6 04-02-2003 09:34 PM


All times are GMT -5. The time now is 10:39 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration