When recompiling your kernel, you might end up seeing strange messages on bootup like:
modprobe: cannot find net-pf-5
modprobe: cannot find char-major-14
These are messages from the modules loader telling you that he can't find specific modules. This usually happens when you compile modules, but modprobe tries to load modules that were not compiled and it can't find them. The way to remove those messages is to set the modules to off. In the file /etc/conf.modules you may want to add:
alias net-pf-5 off
alias char-major-14 off
This will stop modprobe from trying to load them. Of course you could also try to resove the problem by compiling the modules and make sure modprobe knows where they are.
Wednesday, October 22, 2008
Annoying boot messages
Posted by Renganathan at 4:17 AM 0 comments
Allowing users to run root programs
When a user starts a command, it runs with the permissions of that user. What if you want to allow them to run some commands with root permissions? You can, and that's called suid.
You can set a command to be suid root with the chmod command. This will make it run as root even if a user starts it. Here is how to set mybin suid root:
chmod +s mybin
Note that you must be very careful with this option. If the command has any security hole, or allows the user to access other files or programs, the user could take over the root account and the whole system.
Posted by Renganathan at 4:15 AM 0 comments
Allowing users to mount drives
By default, Linux will not allow users to mount drives. Only root can do it, and making the mount binary suid root is not a good idea. With a special command in the /etc/fstab file, you can change that.
This is a typical line for the fd0 (A:) drive in /etc/fstab:
/dev/fd0 /mnt auto noauto,user 1 1
The keywords here are noauto and user. Noauto tells mount not the try to mount a diskette on boot, and userallows any user to mount the drive into /mnt. The auto keyword is also interesting. It tells mount to try to find out which file system is on the diskette. You could also use msdos or ext2.
Posted by Renganathan at 4:10 AM 1 comments