Optimize user security of the UbuntuServer System

Source: Internet
Author: User
Article Title: Security Optimization Methods for users of the deletuserver system. Linux is a technology channel of the IT lab in China. Including desktop applications, Linux system management, kernel research, embedded systems and open-source systems. After installing LAMP Server in Ubuntu server, Ubuntu adds unnecessary users to the system, excessive users leave the possibility for hackers to obtain the shell. disabling unnecessary User shell permissions can reinforce the security of Ubuntu services to a certain extent.
 
After the installation is complete, the default/etc/passwd file content is as follows:
 
QUOTE:
 
Root: x: 0: 0: root:/bin/bash
 
Daemon: x: 1: 1: daemon:/usr/sbin:/bin/sh
 
Bin: x: 2: 2: bin:/bin/sh
 
Sys: x: 3: 3: sys:/dev:/bin/sh
 
Sync: x: 4: 65534: sync:/bin/sync
 
Games: x: 5: 60: games:/usr/games:/bin/sh
 
Man: x: 6: 12: man:/var/cache/man:/bin/sh
 
Lp: x: 7: 7: lp:/var/spool/lpd:/bin/sh
 
Mail: x: 8: 8: mail:/var/mail:/bin/sh
 
News: x: 9: 9: news:/var/spool/news:/bin/sh
 
Uucp: x: 10: 10: uucp:/var/spool/uucp:/bin/sh
 
Proxy: x: 13: 13: proxy:/bin/sh
 
Www-data: x: 33: 33: www-data:/var/www:/bin/sh
 
Backup: x: 34: 34: backup:/var/backups:/bin/sh
 
List: x: 38: 38: Mailing List Manager:/var/list:/bin/sh
 
Irc: x: 39: 39: ircd:/var/run/ircd:/bin/sh
 
Nobody: x: 65534: 65534: nobody:/nonexistent:/bin/sh
 
Syslog: x: 101: 102:/home/syslog:/bin/false
 
Klog: x: 102: 103:/home/klog:/bin/false
 
Mysql: x: 103: 104: MySQL Server,:/var/lib/mysql:/bin/false
 
Admin: x: 1000: 1000: Administrator,:/home/admin:/bin/bash
 
The specific content varies depending on the services selected for installation. Ubuntu creates more than 20 accounts by default. Most users do not know the specific purpose of these accounts. Several accounts are generally unnecessary for a web server, you can disable logon to these accounts by changing the shell (/bin/false ):
 
QUOTE:
 
Root: x: 0: 0: root:/bin/bash
 
Daemon: x: 1: 1: daemon:/usr/sbin:/bin/sh
 
Bin: x: 2: 2: bin:/bin/sh
 
Sys: x: 3: 3: sys:/dev:/bin/sh
 
Sync: x: 4: 65534: sync:/bin/sync
 
Games: x: 5: 60: games:/usr/games:/bin/false
 
Man: x: 6: 12: man:/var/cache/man:/bin/sh
 
Lp: x: 7: 7: lp:/var/spool/lpd:/bin/false
 
Mail: x: 8: 8: mail:/var/mail:/bin/false
 
News: x: 9: 9: news:/var/spool/news:/bin/false
 
Uucp: x: 10: 10: uucp:/var/spool/uucp:/bin/false
 
Proxy: x: 13: 13: proxy:/bin/sh
 
Www-data: x: 33: 33: www-data:/var/www:/bin/sh
 
Backup: x: 34: 34: backup:/var/backups:/bin/sh
 
List: x: 38: 38: Mailing List Manager:/var/list:/bin/false
 
Irc: x: 39: 39: ircd:/var/run/ircd:/bin/false
 
Nobody: x: 65534: 65534: nobody:/nonexistent:/bin/false
 
Syslog: x: 101: 102:/home/syslog:/bin/false
 
Klog: x: 102: 103:/home/klog:/bin/false
 
Mysql: x: 103: 104: MySQL Server,:/var/lib/mysql:/bin/false
 
Admin: x: 1000: 1000: Administrator,:/home/admin:/bin/bash
 
Of course, if the service is needed, do not change the shell.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.