About sudo. There's a file /etc/sudoers wherein are listed the super users for the system. One of them, obviously, is root. If you want to convert a normal user to a super user, you add an entry corresponding to his login to the file. Now whenever that user runs a command sudo
This brings me to another useful (although potentially dangerous) feature - the suid bit. The set user id bit or the suid bit is a permission given to an executable file by the owner of the file, which allows the file to be executed as if the owner is executing it (with the previliges of the owner). So, a file with the suid bit on owned by root would execute with root previliges when it's run by a normal user. ls -l would show the last alphabet of the permissions to be 's'. While this feature is obviously useful in circumstances where root previliges are required, the file which is suid root has to be robust. Any vulnerabilities in the program could result in obtaining a root shell by buffer overflow or any other means. So suid root programs are strongly discouraged.
More on perms later...
No comments:
Post a Comment