How to remove the "Slit" panel?


Forum: DSL Tips and Tricks
Topic: How to remove the "Slit" panel?
started by: StevenCheng

Posted by StevenCheng on Aug. 01 2005,01:55
Dear all,

I'm new in DSL and I'm facing a security problem. I want to limit authority of mounting HD to root user only. However, user can easily mount to any drive by using the Slit panel on the right-bottom corner. Does anyone know how to remove or disable the mounting function of "Slit"?

Thanks in advance...

Posted by SaidinUnleashed on Aug. 01 2005,02:01
it'd be better/more secure to edit fstab to allow only root to mount stuff.

to remove mount.app from the startup stuff, edit /usr/bin/enhance

or, failing that

killall mount.app

-J.P.

Posted by StevenCheng on Aug. 01 2005,02:52
Thanks for your reply.

However, how can I edit the /usr/bin/enhance file?
I tried to open it with a text editor but the file is read-olny. I tried to set it to read enable by [chmod 777 enhance] under root login but can't success.

Would you mind to tell me more?

Posted by SaidinUnleashed on Aug. 01 2005,03:11
sudo beaver /usr/bin/fstab

should get you there.

Posted by StevenCheng on Aug. 01 2005,03:30
Thanks again for your reply.

It does open the beaver program with an empty file of fstab. However, what should I do next? I think I should edit the /usr/bin/enhance file but the problem is I can set it to write enable.

(I'm absolutely new in DSL and my question may be not clearly stated...)

Regards,

Thanks in advance...

Posted by cbagger01 on Aug. 01 2005,03:38
Here are a few pointers.

(1) Boot with the command "noicons" and your mount.app will never appear.  Also, booting with "nofstab" should prevent the autogeneration of the fstab and the user permissions that go with it.  So if you boot with "nofstab", you should be able to prevent the regular user accounts from mounting a hard drive partition.

(2) If you use the Backup/Restore process, it is possible to customize many of your files to change what the user can see or has access.

(3) A good place to do things like change permissions via a startup script is to edit your /opt/bootlocal.sh script.  This is kinda like an AUTOEXEC.BAT script from the old MSDOS days.  You can use it to change the permissions in your /etc/fstab and or to remove mount.app from the fluxbox menu, etc.

Posted by StevenCheng on Aug. 01 2005,03:50
Thanks!
Posted by StevenCheng on Aug. 01 2005,04:01
Quote (cbagger01 @ July 31 2005,23:38)
Here are a few pointers.

...

(3) A good place to do things like change permissions via a startup script is to edit your /opt/bootlocal.sh script.  This is kinda like an AUTOEXEC.BAT script from the old MSDOS days.  You can use it to change the permissions in your /etc/fstab and or to remove mount.app from the fluxbox menu, etc.

I've tried to insert a line in the bootlocal.sh file:
sudo killall mount.app


However, when I restart the system. The user still can mount HD...

Anything wrong with my steps?

Thanks again...

Posted by StevenCheng on Aug. 01 2005,04:35
Dear all,

the sudo killall mount.app command can remove the mounting window in the "Slit" control panel,; however, when I put it in the bootlocal.sh file, it tried to remove the mount.app before it is create (failed).

Any better ideas?

Thanks

Posted by cbagger01 on Aug. 01 2005,04:56
Yes,

If you want to kill an X-Windows application, try this.

edit your

/home/dsl/.xinitrc

file and add your killall command directly after the enhance command.

Posted by StevenCheng on Aug. 01 2005,07:47
Quote (cbagger01 @ Aug. 01 2005,00:56)
Yes,

If you want to kill an X-Windows application, try this.

edit your

/home/dsl/.xinitrc

file and add your killall command directly after the enhance command.

Thanks for you post.

I've edit the /home/dsl/.xinitrc file as follow:

if egrep -qv noicons /proc/cmdline 2>/dev/null;then
 enhance &>/dev/null & Killall mount.app &
fi
#dillo /usr/share/doc/dsl/getting_started.html &>/dev/null &
fluxbox 2>/dev/null

However, it didn't work... :(

Did I make any mistake?

Posted by mikshaw on Aug. 01 2005,13:19
The very first suggestion by SaidinUnleashed is the one and only true answer.  Unfortunately a typo on his part caused a snag that apparently sent you in the wrong direction.

The file is /etc/fstab
It is composed of 5 columns.  The 4th colum is the one you need to look at here.  This column contains the mount options for your devices.  If the mount options include "user" or "users", then regular users can mount devices.

If there's something else overriding fstab in this case, I don't know what it is.

Also, as long as sudo does not require user dsl to enter a password, the "security" on your system is not much better than it was before.

Also #2:  This forum is only a day old and already it's tainted. :laugh:  This forum is for posting tips, not for asking questions.

Posted by cbagger01 on Aug. 01 2005,17:26
Yeah.

Try getting rid of the "&" that is immediately after the word "enhance"

Posted by mikshaw on Aug. 01 2005,20:18
enhance &>/dev/null & Killall mount.app &

This line should also not be run together as a single command

Posted by StevenCheng on Aug. 02 2005,02:33
Quote (mikshaw @ Aug. 01 2005,09:19)
The very first suggestion by SaidinUnleashed is the one and only true answer.  Unfortunately a typo on his part caused a snag that apparently sent you in the wrong direction.

The file is /etc/fstab
It is composed of 5 columns.  The 4th colum is the one you need to look at here.  This column contains the mount options for your devices.  If the mount options include "user" or "users", then regular users can mount devices.

If there's something else overriding fstab in this case, I don't know what it is.

Also, as long as sudo does not require user dsl to enter a password, the "security" on your system is not much better than it was before.

Also #2:  This forum is only a day old and already it's tainted. :laugh:  This forum is for posting tips, not for asking questions.

Thanks again for you guys, you are so kind to answer my question even I posted it in a wrong forum. Sorry...


I've tried to edit the /etc/fstab file. I replaced the "users" strings with "root". Without any luck, it turns out that the /etc/fstab file was dynamically created everytime when the system was booted up. (The original value "users" were restored...)

How can I deal with it?

Regards,

Posted by SaidinUnleashed on Aug. 02 2005,05:05
Try this.

Get a blank cdr. Make sure you have a cd writer.

Boot up DSL with the toram cheatcode (dsl toram) and leave the CD in.

edit /home/dsl/.xinitrc to where it looks like this.

Code Sample

# put X windows programs that you want started here.
# Be sure to add at the end of each command the &
if egrep -qv noicons /proc/cmdline 2>/dev/null; then
 enhance &>/dev/null &
fi
killall mount.app
fluxbox 2>/dev/null


Open up /home/dsl/.filetool.lst with an editor, and add the following text, on a new line.

Code Sample
home/dsl/.xinitrc


and run the backup (System >> Backup/restore) to a hard disk (not ntfs), usb, or even a floppy, if the default + this is all you are backing up.

rename the created file to "mybackup.tar.gz"

If you have a lot of ram (256mb or more should be enough) create a new directory in /home/dsl called work, and 2 sub-directories in it called extensions and iso.

If you don't have enough ram, you can use a hard disk partition (not ntfs), or even a usb pendrive. Just make the work folder and its subdirectories. I'll assume from here that it is in /home/dsl, but if it's not, use the appropriate path to there you put the work dir.

move/copy mybackup.tar.gz to /home/dsl/work/extensions.

In the menu, go Apps >> Tools >> Make myDSL CD Remaster

Enter /home/dsl/work/extensions as the extension directory

Enter /home/dsl/work/iso as the directory to hold the new myDSL iso.

Enter nofstab when it says "Enter optional boot time options:".

Follow the remaining instructions, and insert your blank CDR when it tells you to.

When it's done burning, you should have a CD that a normal user, even with sudo powers, cannot mount a partition unless he knows how to do it without fstab, and most people don't.

-J.P.

Posted by StevenCheng on Aug. 04 2005,01:24
Thanks a lot.
Posted by Hazz on Sep. 23 2005,11:50
How can I edit the things that are in the "slit" ? like i wanna remove some parts ,,,, I added the memory monitor twice ,,, how can i remove it ?

Thanks.

Posted by mikshaw on Sep. 23 2005,15:34
in order to close applications that are currently running, you'll need to find out what the application's command is (you can probably guess easily enough from looking at the output of 'top'), and then "killall <command>".  You can probably also use the xkill command to destroy apps by clicking on them, but i haven't tried it.

If you want to prevent certain apps from starting automatically, edit /home/dsl/.xinitrc in DSL 1.5, or /usr/bin/enhance in 1.4 and earlier.

If you're going to ask a question, *please* 1) try the search button first, 2) post in an appropriate forum, and 3) read a thread before you decide to post a question in it.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.