| Just Joined!
Join Date: Jan 2008
Posts: 22
| Could it be this secure? I understand you want to do it easy, but trying this "avoid su command", are not you letting insecure your system? can anybody explain me if it is secure, from my point of view it is not!
GNU/Linux is well known for its security level, well in that way learn it, and it is the reason why i used it now a days, there are both bin and sbin directories located in / and /usr, where the bin directory are commandos for normal users only and sbin for root only so trying to use a root user you must have root privileges, i do not feel unconfortable doing "su -" to execute a commando, but i feel more secure to know what i run and under on what privileges i am running it, if you are going to install a tar ball is well known you can do "./configure,make" as normal user but you must log in as root to execute "make install", this because one reason, an user must not change or touch the system.
Is not bad idea trying to simplify it but you will get use to it, and then you will have an administrator MS-windows like enviromente, then do not blame the GNU/Linux for doing something you did it by your self, we are humans, and we make mistakes, i think that being root on a GNU/Linux OS is not scary but you must know what are you doing, and we are use to make mistakes, in somewhere in timeline you will forget it and do somethink you will say your self, "i should not do this!".
For Every script i create and before run it i make a backup of my files, always that i will run it as root, by experience some times at my beginning learning i did horrible things to my systems, i did erase parts and that was because i run everithing in a root enviroment. i.e. One time i did a simple script to clean garbage and files i did stop to being viewed passed a time, and it was usefull just for the users folders, but for a mistake i did run it under root privileges and erase a lot of files, being finished, at rebooting the system some time ago everything start to crash, it was my pc so nothing scare, but a mistake i take it on count, and it was not the script the gilty it was me, because the script was right, it do what i told it to do, and what i wanted, but it search and clean all what root did not read in the specific time, so it was garbage for the script, i could make restrictions but it was more than a simple script, why? it was my need, but the point is other.
So think having all the privileges and deleting and erasing, executing and everithing from your user privileges acount as if you were the "MS-Windows privileged" root user in GNU/Linux, you will return to an MS-Windows system like.
That is why i abandon MS-products because the user could be an administrator and i could do everything. Worms, virus get into my system and bye,bye, all for my administrator privileges. In linux there are not virus but other kind of malware, the hard ones called rootkits, so beware.
So you can gain root privileges as root but is not good idea. Being able to execute administrators comandos, you will not have much time until you download something and without reading what it really does, you will install a rootkit in your OS, or a malware, you are killing your self or exposing it to others.
Is just my point of view, if I am wrong correct me please!
If you steel want to do it like that, follow what "reed9" wrote, is the best solution.
To make it easy what you need to do is to make an alias to every commando in /sbin and /usr/sbin, it can be done executing the following scripts.
NOTE: Change username by your real username
for /sbin run this:
for item in `ls /sbin`; do
if [[ ! -d $item ]]; then
echo "alias $item=\"sudo /sbin/"$item"\"" >> /home/username/.bashrc
fi
done
for /usr/sbin you can run this:
for item in `ls /usr/sbin`; do
if [[ ! -d $item ]]; then
echo "alias $item=\"sudo /usr/sbin/"$item"\"" >> /home/username/.bashrc
fi
done
Then check and verify if it's correct in the file .bashrc of your user and change username by your real username.
Any way i am still thinking it is not right to run commands that only root must run, but anyway , try it!
Have fun! |