LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 12-10-2004, 05:38 AM   #1
intercodes
Member
 
Registered: Aug 2004
Posts: 42

Rep: Reputation: 15
Some command not working in user using SU..


Hiya,

Fedora core-3

I have an user account setup. After logging into my account, in the terminal , i use 'su' to login into the root acount to activate my network card. But the commands doesnt seem to work. Many commands dont seem to work while using su in user account. But it works when i login as a 'root' user.
Is there somekinda path that i should add to the user account, or its locked down for security reasons?

Thanks In advance
 
Old 12-10-2004, 05:42 AM   #2
salparadise
Senior Member
 
Registered: Nov 2002
Location: Birmingham UK
Distribution: Various
Posts: 1,736

Rep: Reputation: 146Reputation: 146
I'm not overly familiar with FC3, but on FC2 I found that some commands needed /sbin/ putting in front of them on the command line.
The alternative is to to use the "su -" command. This logs root in rather than just running with root priveleges. When using the su - command I found that /sbin/ was no longer needed.
Hope this helps.
 
Old 12-10-2004, 05:46 AM   #3
intercodes
Member
 
Registered: Aug 2004
Posts: 42

Original Poster
Rep: Reputation: 15
Thumbs up Thank you Very much

salparadise,

Thanks, it worked. infact both of them worked. Using su - and /sbin.
so 'su' is still lacking root access? To gain complete root in user account, i should always use su - ?
 
Old 12-10-2004, 08:08 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,961

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
"su -" will use root's environment which includes /sbin in the path. Just using su will still use the regulars users environment from which the command was initiated and by default does not include /sbin.

Using the full path i.e. /sbin will always work no matter what. i.e. a user, su or su -

Some commands located in /sbin require root privileges but thats another topic.

Unlike windows linux only searches for a command using the path environment even if your current working directory is where the command you need is located. To see your path:
echo $PATH

Last edited by michaelk; 12-10-2004 at 08:09 AM.
 
Old 12-10-2004, 09:05 AM   #5
intercodes
Member
 
Registered: Aug 2004
Posts: 42

Original Poster
Rep: Reputation: 15
michaelk,

Cheers! Thank you , I got it.
 
  


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
user can use command.. bruse Mandriva 2 04-12-2005 08:21 AM
what is the command to make a user change their password after creating a new user? naweenio Linux - Newbie 7 01-05-2005 08:07 AM
Execute a command as another user mpgram Linux - Newbie 6 06-09-2004 12:45 AM
stopping a user from using the su command caged Linux - General 5 06-03-2004 02:06 PM
execute command as different user kilobravo Linux - General 2 06-02-2003 11:03 AM


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