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-24-2008, 02:56 PM   #1
POW R TOC H
Member
 
Registered: Mar 2008
Location: Serbia
Distribution: Fedora
Posts: 37

Rep: Reputation: 15
Non-root user can't see all commands (Zenwalk)


Hello. I have installed Zenwalk, but I have a problem (probably designed that way, but I don't like it ) :
A non-root user can't see programs that require root privileges (in terminal). For example, when I type
Code:
'netpkg mirror'
I get
Code:
bash: netpkg: command not found
. This goes for all commands that require root privileges, which is annoying (can't see them, can't use auto-complete with them, etc)

In Fedora, I get an error message when I try to use a program that requires more privileges than I've got, but in Zenwalk, I don't even see those with sudo! I have to log in as root (or use su)... Any idea on why this is, and how to fix it?

Thank you in advance, and sorry if I misspelled something. My spell checker is broken too
 
Old 08-24-2008, 03:03 PM   #2
Renan_S2
Member
 
Registered: Jul 2007
Location: Santa Maria, Brazil
Distribution: Arch Linux
Posts: 66

Rep: Reputation: 16
It is likely because /sbin and /usr/sbin aren't in your $PATH.

To set it, type:

export PATH=$PATH:/sbin:/usr/sbin

And/or put it into your .bashrc.
 
Old 08-24-2008, 03:20 PM   #3
POW R TOC H
Member
 
Registered: Mar 2008
Location: Serbia
Distribution: Fedora
Posts: 37

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Renan_S2 View Post
It is likely because /sbin and /usr/sbin aren't in your $PATH.

To set it, type:

export PATH=$PATH:/sbin:/usr/sbin

And/or put it into your .bashrc.
That solved it, thank you
 
Old 09-04-2009, 11:56 PM   #4
xroox
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Rep: Reputation: 0
Hi

Hi thanks for the info solved my problem too. I really hate not knowing what commands "do" when I type them in. Would you be able to maybe explain what that did and why I needed to do that? If it's not too much trouble I'd really appreciate it.

Thanks,

xroox
 
Old 09-05-2009, 12:02 AM   #5
xroox
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Rep: Reputation: 0
woah, now when I try and pick a mirror it says:

tail: cannot open '/var/netpkg/db/last_mirror' for reading: No such file or directory

Then:

Connecting to mirror
Uncompressing meta information
Unable to extract meta information, please check the network or choose another mirror

Then nothing... I've tried several of the mirrors. Weird? No internet working yet? Not sure. Thanks.
 
Old 09-05-2009, 12:51 AM   #6
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
When you type a command, the shell will look in the directories specified in the path to find it. The command in post #2 added some directories to the path.

The *nix world has split user commands and superuser commands into different directories. The idea is/was that normal users don't have to execute those commands so don't need access to them. Nowadays the world has changed as on desktop systems there is often only one user.

At times I consider it an annoyance, but I can live with it. I can always use locate to find it and execute the command using the full path.

I can not answer your second question for sure, but if you ran that command as a normal user you might not have the permissions to access '/var/netpkg/db/last_mirror'.
 
Old 09-05-2009, 12:57 AM   #7
xroox
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Rep: Reputation: 0
Ok

Thanks! Ok I went to that path and indeed there was no file by that name there. I could not seem to gain SU access though, I might have skipped by something in the installation as I was only half-looking at the screen. I would have thought I put a password in during installation but maybe not.

Thanks for the info so far most appreciated this will be great once I get it going. Fun.

xroox
 
  


Reply

Tags
commands, root, zenwalk


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 application execute commands with root privileges lbdgwgt Linux - Software 2 01-17-2007 07:51 AM
Root/User rights to Root commands? mrde50garfield Linux - Software 2 10-24-2006 05:42 AM
need to do root commands as a regular user remotely matticus Linux - Newbie 4 08-09-2006 11:50 PM
Giving a user (not a root) an access to some system commands asschay Linux - Newbie 8 09-08-2005 05:53 PM
adding commands to /bin (root user) xone Linux - Software 4 03-23-2004 12:26 PM


All times are GMT -5. The time now is 11:22 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration