In Unix-style computer operating systems, root is the conventional
name of the user who has all rights or permissions in all modes (single-
or multi-user). The root user can do many things an ordinary user
cannot, such as changing the ownership of files and binding to ports
numbered below 1024.
It is never good practice for anyone to use root as their normal user account because simple typographical errors in entering commands can cause major damage to the system. It is recommended to create a normal user account instead and then use the su command to switch when necessary. Some use the sudo utility instead, which allows a measure of graduated access. Following script find out all root user account on system.
It is never good practice for anyone to use root as their normal user account because simple typographical errors in entering commands can cause major damage to the system. It is recommended to create a normal user account instead and then use the su command to switch when necessary. Some use the sudo utility instead, which allows a measure of graduated access. Following script find out all root user account on system.
#!/bin/bash # Shell script to Finding ALL Superuser Accounts # Useful to improve system security. # Copyright (c) 2005 nixCraft # This script is licensed under GNU GPL version 2.0 or above # For more info, please visit: # http://cyberciti.biz/shell_scripting/bmsinstall.php # ------------------------------------------------------------------------- # This script is part of nixCraft shell script collection (NSSC) # Visit http://bash.cyberciti.biz/ for more information. # ------------------------------------------------------------------------- grep -v -E "^#" /etc/passwd | awk -F: '$3 == 0 { print $1}'
0 comments:
Post a Comment