[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] Uninstall programs from linux

Jennifer Waters wrote:

I would like to know how to uninstall, remove, or
disable games and other programs that I don't want
students to get into.

easy. 8-)

Use the package manager `rpm` to tell you what the full name of the package is, like this ;

[steve linuxathome steve]$ rpm -q perl

I asked rpm what it knew about something called 'perl' and it replied with the full name of the package, perl-5.6.1-34.99.6

*AHEM*, don't delete the perl package as in my example, or all hell will rain down on you.. 8-o

Now, 'switch user' to root, like this ;

[steve linuxathome steve]$ su -
Password:  <put root password in here>
[root linuxathome root]#

and use the packaging tool to remove the package, using its' full name, like this ;

[root linuxathome root]# rpm -e perl-5.6.1-34.99.6
[root linuxathome root]#

and *immediately* drop out of root, by typing `exit`.

There are other programs that I would like just certain individuals be able to use.

Easy. 8-)

For example, I have a utility called `nmap` that does firewall scanning - not an appropriate tool to be left lying around.. so...

# We ask the system where nmap is located ;

[steve linuxathome steve]$ which nmap

# and have a look at its' permissions ;

[steve linuxathome steve]$ ls -l /usr/bin/nmap
-rwxr-xr-x    1 root     root       272179 Mar 26  2002 /usr/bin/nmap

ooo, not good! It's set "read-write-executable" for its' owner (root), "read-executable" for anyone in the "root" group (this will be your admin-type people) AND "read-executable" for "everyone else" - wich will have to change! ;-)

# 'switch user' to root

[steve linuxathome steve]$ su -
Password: <root password goes here>

# and change the mode of this file, and exit from 'root' immediately.

[root linuxathome root]# chmod o-x /usr/bin/nmap
[root linuxathome root]# exit

# That was, "Change Mode - "others" - "cannot eXecute" - "/usr/bin/nmap"
# The 'minus' means "remove this bit". Using a 'plus' (+) will add a permission.

and check what we have done.

[steve linuxathome steve]$ ls -l /usr/bin/nmap
-rwxr-xr--    1 root     root       272179 Mar 26  2002 /usr/bin/nmap

Now try running `nmap` and see if works. If you are in the root group, you will still be able to execute nmap, but otherwise, heh, it's not gonna happen. Now ordinary users can't scan others' firewalls. Sorted!

The safer way to do things as root is with `sudo` but that's another topic.

HTH, Steve

note: You can view the manual for all these commands by typing `man <command>`

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]