no output for fdisk -l
when i'm not logged in as root i get no output when running fdisk. i can't even find the command without giving the absolute path
Code:
/sbin/fdisk -l oh, and i'm using slackware 13 if that helps at all. |
Use sudo fdisk -l
Or login as root with su If you want your account to be in the sudoers so you can just use sudo fdisk -l do echo 'usernamehere ALL=(ALL) ALL |
fdisk -l not found
If the first word on a command line, which is almost always a command, does not contain any "/" characters, your shell tries to find the command you're trying to run.
To do this (unless the command is a built-in, an alias or a defined function), the shell searches the directories that are contained in your PATH variable, which usually has a list of one or more directory pathnames seperated by ":". You can view your current PATH by entering: echo $PATH It will include /bin and or /usr/bin, but not /sbin. If you enter: PATH=$PATH:/sbin you can then run fdisk -l without having to qualify its location. To make this change to the PATH variable permanent, edit the .profile file in your home directory and add that same line of code (PATH=$PATH:/sbin) somewhere in the file, then the next time you log in, you'll be able to run any of the commands in /sbin without having to tell the shell where to find them. I'm not sure, though, why the output is blank. I'll boot up my Linux laptop and check it out. Best regards, Walt Uotinen |
Hello together,
you'll need root-permissions to get an output for the command and you'll have to take the full path since /sbin is not in the path for a normal user. Code:
sudo /sbin/fdisk -l Markus Edit: in Slackware, if you have not configured sudo just try Code:
su -c /sbin/fdisk -l |
no output for fdisk -l
One other way to get fdisk to give you output without using sudo or becoming root (with su):
Become root, then enter: chmod u+s /sbin/fdisk This enables the Set User Id bit on the executable, so anyone can run fdisk and the process will have an effective user id of 0, indicating that root is running it. A word of caution, though, that will allow anyone to use fdisk, albeit they'll have to run /sbin/fdisk, but it can do far more than just produce reports. It can reformat a disk... Best regards, Walt Uotinen |
Quote:
Easiest way, set up sudo. Configure it so you can use it and it will null your authentication after 30 seconds or so. Keep it secure :) |
sbin = system binaries; those usually only needed by root(!) user.
http://en.wikipedia.org/wiki/Filesys...archy_Standard |
All times are GMT -5. The time now is 07:58 AM. |