LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-03-2004, 09:48 AM   #1
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Rep: Reputation: 30
cannot execute some commands as an plain user!


hello....
my problem is when I log as 'user', I cannot execute the 'shutdown' command, neither the 'telinit' ... If I log as root, that commands work just fine.
Something similar happens with the aliases... first of all, there is not a '.bashrc'
file in my distro ...guess it's normal, so I discover I can make my aliases in the 'profile' file.... and it works ok...only if I'm root.. if I'm not, there is at least one alias that doesn't work, and it is the one who call the 'clear' command: when I log as user, when I execute 'myClearAlias', it returns me something like: 'can't find command' ..but if I execute the 'clear' command, it works ok... (in all of the unsuccessful cases, the error message is the same: 'can't find command', or something like that -- and ,of course, in the cases that the commad doesn't work, aliases pointing to that command neither works)
does anybody know what's wrong?
thanks in advance.
 
Old 09-03-2004, 10:03 AM   #2
philip_bonev
LQ Newbie
 
Registered: Sep 2004
Location: Sofia, Bulgaria
Distribution: Gentoo
Posts: 5

Rep: Reputation: 0
Hi,

Commands such as halt,telinit,shutdown and etc are not supposed to be run from other user than root. And that is for all of the distro's. For the .bashrc created yourself. And put what you like in it. And it's normal when you make an alias to none exsting command to give you can't find command . An alternative of .bashrc is .bash_profile. .bash_profile executes on login and .bashrc on interactive shell startup.
 
Old 09-03-2004, 02:25 PM   #3
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Original Poster
Rep: Reputation: 30
thanks for answer, Philip...
I have heard that's not good idea to log always as root , so -according with your explication, how should a plain user turn off the computer?
greetz
 
Old 09-03-2004, 04:28 PM   #4
philip_bonev
LQ Newbie
 
Registered: Sep 2004
Location: Sofia, Bulgaria
Distribution: Gentoo
Posts: 5

Rep: Reputation: 0
You've heared well, if you gone shutdown just su and shutdown. Normal practice is when you need root priviliges su and do what you(system administration things) and then back to the normal user.
 
Old 09-03-2004, 05:38 PM   #5
ringwraith
Senior Member
 
Registered: Sep 2003
Location: Indiana
Distribution: Slackware 15.0
Posts: 1,272

Rep: Reputation: 65
If you are not concerned about other people being able to shutdow, you can also change the permissions for it. man chmod
 
Old 09-03-2004, 07:34 PM   #6
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Original Poster
Rep: Reputation: 30
thanks, pals!
gonna stay in touch
 
  


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
[Samba] Execute commands depending on user billiejoex Linux - Software 1 10-25-2005 01:01 PM
BASH scripting; su to user, commands after dont execute Zero-0-Effect Programming 4 06-07-2004 12:09 PM
how can execute some commands when a user logs out rddreamz Programming 2 05-25-2004 04:00 PM
Can't execute commands when logged in as ordinary user.... murphaph Linux - General 3 04-05-2004 06:23 PM
VNC showing plain X w/ no desktop when vncserver started by non-root user jboo Linux - Software 6 02-08-2004 05:45 AM

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

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