I checked .bashrc and .bash_profile for the root account and my personal account and the PATH seems to be identical.
However, When I run a command such as fdisk under my account I get 'Command not found' while it works fine for root.
Is this a permission thing? In FreeBSD it usually tells me that I don't have permissions. What's the deal here?
I think 'fdisk' is under /sbin/fdisk. Since I'm not in linux, I can't tell you where it is but run 'which fdisk'. Once you get the path, use 'ls -l <path>' to see the permissions on it. I'm very sure that the permission is set for root to execute this program.
fsidk is under /sbin/fdisk
if u try to run it as a normal user you'll get the error message
"Cannot open <device>"
you'll haveto run it as root
Right so run 'ls -l /sbin/fdisk' This will then give you a long list of the file along with the permissions, date of last modification, and etc. You guys do know how to read permissions don't you?
It's no wodner that you found no difference in root's .bash* files. The */sbin dirs are added to the PATH in /etc/profile.
So as a user, either, as has been suggested, run /sbin/fdisk, or do as I have done, add */sbin to your PATH as your user login as well (there you can use the .bash* files, preferably .bash_profile).
That explains it. Is this just a Linux thing? I don't think it works like that in FreeBSD
I think its more of a common sense thing.
Why would you want normal users to have access to /sbin or /usr/local/sbin.
Only root should be able to run/access those commands.
What did you mean that it was that wouldn't be possible in BSD?
What I meant was that on my freeBSD box, when I create a user and give him the bash shell there appear a lot more directories under PATH than there are in my bash file on RH