Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How did you edit the file? The proper way is with the visudo command. Editing this file manually is not a good idea. If you don't like the editor which visudo uses, you can set the EDITOR environment variable. For example, if it uses vi, and you like nano, you might enter this command (as root):
Code:
# EDITOR=nano visudo
You can fix the sudoers file permissions like this:
I logged in as root and edited it with kwrite.
I tried what you said,
Code:
# chmod 440 /etc/sudoers
and when i try to do a command (i.e)
Code:
$ sudo "modprobe psmouse"
sudo: modprobe psmouse: command not found
$
Now sudo appears to be functioning correctly, but your modprobe command is failing. To verify sudo's success, sudo a command which should surely succeed:
Code:
sudo echo hello world ; echo $?
If you see 0 after the hello world, sudo if fixed.
As for the psmouse module, my debian install has this built into the kernel - it is not a loadable module. You can check if this is the case with your installation with this command:
Code:
grep PSMOUSE /boot/config*
If you see "CONFIG_PSMOUSE=y", PSMOUSE is built into the kernel, not a module.
To verify sudo's success, sudo a command which should surely succeed:
Code:
sudo echo hello world ; echo $?
If you see 0 after the hello world, sudo if fixed.
I tried that and it worked.
Quote:
As for the psmouse module, my debian install has this built into the kernel - it is not a loadable module. You can check if this is the case with your installation with this command:
Code:
grep PSMOUSE /boot/config*
If you see "CONFIG_PSMOUSE=y", PSMOUSE is built into the kernel, not a module.
The "CONFIG_PSMOUSE=y" came up, when i did that.
I run "modprobe psmouse" all the time as root so that my touchpad works and it does work as root.
I run "modprobe psmouse" all the time as root so that my touchpad works and it does work as root.
And it works as root? On this machine? In the same installation of debain? In my debian installation typing modprobe psmouse as root gives the same error message as you see when you run it with sudo. I can think of no reason why it would work as root, but not with sudo.
Last edited by matthewg42; 12-05-2006 at 07:56 PM.
Sudo works in the user's environment by default, so if /sbin isn't in your user's $PATH then sudo won't be able to find it even though it's executing the program with root priviledges. I've run into this problem before and this should hopefully be your fix.
Sudo works in the user's environment by default, so if /sbin isn't in your user's $PATH then sudo won't be able to find it even though it's executing the program with root priviledges. I've run into this problem before and this should hopefully be your fix.
That worked, now my question is how do i add /sbin to my $PATH?
I'm pretty new to slackware and still dont know what that is exactly.
And thanks alot for the help, both of you.
That worked, now my question is how do i add /sbin to my $PATH?
I'm pretty new to slackware and still dont know what that is exactly.
And thanks alot for the help, both of you.
Add following line to .bashrc
PATH = $PATH:/sbin
to edit .bashrc open terminal in home directory
>gedit .bashrc
Note that you should not have any relative paths in your path, the most commonly found one is "." - the current working directory. This is security risk - if some program creates a file which has the same name as a utility which is often run as root in the current directory, you don't want a risk to run it accidentally. Now you are doing admin stuff from this user, you should check your PATH is safe.
Add following line to .bashrc
PATH = $PATH:/sbin
export PATH
This is something I've seen many times - setting PATH first, then exporting it. Is there some advantage to doing this over having it all in one command, "export PATH=..."?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.