BLAG

BLAG Forums
It is currently Mon Dec 22, 2014 12:09 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sat Jun 19, 2004 8:36 am 
Offline

Joined: Thu Jun 17, 2004 5:34 pm
Posts: 41
Hello again. I use ndiswrapper to utilize my drivers for the wireless card I have, so often times when I boot into a linux distro I have to run the modprobe/ifconfig commands to get my card 'online.' However, I've noticed that when I'm logged into my user account I can't use these commands, not even when I SU. I don't remember this happenening at first, but it happened again tonight for the second time I think. I can log out of my user account (magnet) and then log in as root and get my stuff working, but that's kind of inconvenient and I don't see why I can't use the commands as 'magnet' anymore. Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 19, 2004 9:22 pm 
Offline

Joined: Thu Jun 17, 2004 5:34 pm
Posts: 41
This is getting obscene. Maybe I never could use those commands while logged in as a regular user...but I swear I could. Either way I've reinstalled to start anew, to see if it was something I did that screwed it up, but I still can't do commands like modprobe and iw/ifconfig. And now I can't seem to mount my windows partition correctly. I added the same entry to /etc/fstab as I did last time, and last time it worked...but now it doesn't. Well, let me clarify...last time I could read files in the mounted windows dir (I mounted /dev/hda2 to /mnt/win) when I was logged in as the normal user. Now I can't. It seems like I can only do anything I'd like to do when I'm actually logged in as root (not SU, I've tried that).

What's happening? :( Please help I'm getting very frustrated.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 20, 2004 1:43 am 
Offline
Site Admin

Joined: Sun Mar 14, 2004 3:17 pm
Posts: 4492
Location: Loveland, Colorado, USA
The reason you can't run the commands when you `su` to root is that they are not in your $PATH.

There are a couple solutions. I'll use `ifconfig` as an example.

Code:
su
ifconfig


will give you:
"bash: ifconfig: command not found"

Code:
su -
ifconfig


will run ifconfig. The "-" means to read in root's environment variables, which adds /sbin to the path.

Code:
su
/sbin/ifconfig


This will also run ifconfig, since an absolute PATH is specified.

Another approach would be to add /sbin & /usr/sbin to your own PATH.

vi .bashrc (or whatever editor you use). Add the line:
Code:
PATH=$PATH:/sbin:/usr/sbin


Once you log out and back in, these will be your settings, so you won't run into command not found when you run stuff in /sbin & /usr/sbin

-Jeff


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 20, 2004 5:39 pm 
Offline

Joined: Thu Jun 17, 2004 5:34 pm
Posts: 41
Thank you very much good sir about the commands. Do you know what happened to my ability to view the mounted partition though? It's a big inconvenience to be unable to access it in programs like XMMS as a regular user.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 22, 2004 6:29 am 
Offline

Joined: Thu Jun 17, 2004 5:34 pm
Posts: 41
Okay, never mind the mounting stuff. When I edited my /etc/fstab again I placed the wrong command there, so 'magnet' couldn't see it. But I've got it working now. Thanks again.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group