Answer the question
In order to leave comments, you need to log in
Why is it not recommended to always use the root account in linux?
Why is it not recommended to always use the root account in linux.
I don’t know about you, but the first thing I do if I connect to the server not as root, I drive in sudo -i.
There are people who automatically drive in sudo before each command.
Etc.
So why invent unnecessary difficulties for yourself, all the same, you do all the manipulations under the root.
Answer the question
In order to leave comments, you need to log in
"Mom, look, I'm driving without hands!
Mom, look, I'm driving without a tooth!"
That's about why. The risk of screwing up is higher, while 90% of what you do after entering sudo does not actually require superuser rights.
Plus, all files created by root are owned by root, which is often not what you had in mind. Instead of shamanism with chmod / chown, it's easier to log in under the user who will work with them.
Actually, the recommendation "do not work as root" means "do not confuse work with administration, root is only for the second."
Is it true that this issue is considered on the toaster from all possible sides and points of view? :)
When you understand why working under root is dangerous, you can safely work under it. This recommendation is usually given to novice admins and it is completely justified. Especially with the current fashion, it's stupid to copy-paste everything that gets into your console.
Why is it not recommended to always use the root account in linux.Because this entry is for system administration.
Short-term connections to a remote server for its administration are not the same as working under Linux.
Sudo is not needed when working in the server console. Is it so?
https://serveradmin.ru/sudo-ne-nuzhen-pri-workote-v...
without access to critical files you can't.
1. get infected with a virus (you can’t do it at all)
2. Damage it
3. OS itself provides confidentiality, you just got used to Windows, it’s generally normal not to work from the admin.
After thinking about this, you will come to the conclusion that this is much more logical than working from root.
However, I always work on servers from root, because I have enough knowledge and experience and understanding of what I do and how I do it in full, and I understand the risks.
I try to stay away from sudo unless it's about installing software. There was a sad experience at the dawn of a career, with other people's scripts. Actually, both in Windows and in Linux - you need to work only as a user, and save sudo and root for special cases.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question