FreeBSD disable root login ssh and give normal user login rights

Source: Internet
Author: User

Transfer from http://www.linux521.com/2009/system/200904/2021.html

Http://www.myhack58.com/Article/48/67/2011/30575.htm

1. Disable Root Direct login

2. To give normal user permissions

AddUser

Join the wheel group directly or

In the FreeBSD system, the default is not to allow the root user to connect directly to the server via SSH, when installing the FreeBSD system to create an additional user, should not be sure to add this user to the wheel group (if you do not join this group will not SSH), You can also create a user after installing the system and add the user to the wheel group.

In FreeBSD to use the SU command to become the root user, not only to know the root password, but also need to go through special settings, otherwise you will not be able to successfully use this command. This is FreeBSD has more stringent restrictions on the user performing the SU command, The user who can use the SU command belongs to the wheel group (root group, group ID 0), otherwise it cannot be the root user. Therefore, you need to edit the group settings file/etc/group to add the administrative members that require Superuser power to the wheel group.
You can use the following command to su-root a normal User:
PW Groupmod wheel-m <username>
PW User MoD <username>-G wheel
or directly modify the/etc/group file, add the corresponding user to the Wheell group can be
Wheel:*:0:root,username

3. Flush the SSH configuration

1 #/etc/rc.d/sshd restart #重启sshd使配置生效

FreeBSD disable root login ssh and give normal user login rights

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.