Purpose: Create an ftp user on a Linux system and restrict the user's access through ftp. The main directory is "/", and the upper-level directory is not displayed. For example, I want to create a user usertest with the password usertest. The main directory is/home/mpsp/ftp/usertest. Operating System: RedHatEnterpriseLinuxServerrelease5.4 (Tikanga) ftp: vsftp fir
254: Pass the public key to the SSH serverSsh-copy-id [email protected]//upload key pairSSH Server 50[[email protected] ~]# ls ~/.sshAuthorized_keysSSH Server 50 Disable password Authentication loginVim/etc/ssh/sshd_configBayi passwordauthentication No//disable password Authentication login: Wq#systemctl Restart sshdClient 254: Test key pair Authentication Login#ssh [email protected]//Do not enter a password to connect directly#ssh [email protected]//no connection allowed+++++++++++++++++++++++
As shown, create a new user Masterbai under root privileges, and add some information to the/etc/passwd fileIn this file, the user information of the server, such as the red box user, is the user we created, and up to 2-25 of the users, belonging to the system users (in
User management is one of the tasks of Linux system maintenance, in which simple actions such as adding and deleting users are designed.Requirements: Add a lot of users at once. In a text file.Format: In the unit of behavior, each line is a user information. The user name an
try to add sudo and try again. sudo requires us to provide a user password. Please note: It asks you to provide your password, not the root password. Finally, we opened the/etc/sudoers file. In this way, it is not fun to perform a command that only the root user can manipulate without knowing the root user's password.
switch to root identity, if a user accidentally leaked the root password, it is not very insecure system? No mistake, in order to improve this problem, yielded the sudo command. A command that executes a root with sudo can be done, but requires a password that is not the root password but the user's own password. By default only the root user can use the sudo command, the normal
Purpose: Create an ftp user on a linux system and restrict the user's access through ftp. The main directory is "/", and the upper-level directory is not displayed.For example, I want to create user usertest with the password usertest, and the main directory is/home/mpsp/ftp/usertest.Operating System: Red Hat Enterprise Linux
in the Linux system Build File system, build user, modify user group, reset user passwordExperimental background: User and Space user name: BOSSWLB Group and satellite group: BOSSWLB home directory: /BOSSWLB shell: bas
First, view the user:(1) in the terminal. Input: cat/etc/passwd, view the/etc/passwd file on the line.(2) Look at the third parameter: More than 500, is the user behind the build. Others are users of the system.View current Online usersW or Who-aUSER TTY from [email protected] IDLE jcpu PCPUChtty7:0 08:44 2:30m 12:09 0.16s gnome-sessionCH pts/0:0.0 09:09 1:33m 45.22s 44.89s gedit messagesChPTS/2:0.0 10:24 4
Three. Creating a user and a specified directory
Note: To set the appropriate permissions for the directory, it is best to modify it before specifying the FTP home directory
Then change the value of Local_umask in the vsftpd.conf configuration file to 000, generate directory default 777, file default 666
#useradd-D/var/www-s/sbin/nologin FTP3
#passwd FTP3
Set up user Ftp3, and specify their home dire
Linux User identity and File Permission commandsI. User identity and capabilities
Root users have high system ownership and can manage various system functions, such as adding/Deleting Users, starting/disabling processes, and enabling/disabling hardware devices.User UID
In fact, root is just a name. What truly makes it a "Super
Tags: Linux system font Universal root privileges Linux Vim edit modify exit Enter passwordWhen using a Linux system, you will often be asked to use Super permissions, but Root is too large, and generally use caution!!! So you can add sudo permissions to ordinary users, usually with ordinary users to operate, when the
passwordGPASSWD [option] Group-A: Add users to this group-D: Remove users from this groupVii. OtherWhoAmI, who, W, id1. WhoAmI: Print User[Email protected] ~]# Whoamiroot2. Who: Show who is logged in[[email protected] ~]# whoroot pts/0 2015-08-29 23:26 (192.168.3.9)3, W: Shows who is logged in and what is being done[Email protected] ~]# W 00:16:20 up 1:03, 1 user
Add sudo permissions to non-root users under Linux system sometimes, running the sudo command on a Linux system that is not root will prompt you for similar information:inch file. Here, XXX is the current user name, the user cannot execute the sudo command, at this time, th
.-S: Specifies the shell to use when the user is logged in.-U: Specifies the user ID number.4. DescriptionUseradd can be used to create a user account, and it is the same as the AddUser command. After the account is built, use passwd to set the password for the account. The account created by using the Useradd command is actually saved in the/etc/passwd text file
Yum-y install vsftpd
Man Yum exits by Q
/Etc/init. d/vsftpd start
// Add an FTP user. You cannot log on to Linux. The access path is/var/www/html.
/Usr/sbin/adduser-D/var/www/html-g ftp-S/sbin/nologin abinxm
// Change the password
Passwd abinxm
FTP 127.0.0.1....
Ls226 transfer done (but failed to open directory)
/Etc/SELinux/config can be changed to SE
//Change password for Tommy. Password//Enter a new password here password//Enter the new password successfully again. 2. Give root permissionMethod One: Modify the/etc/sudoers file, locate the following line, remove the previous comment (#)# # allows people in group wheel to run all commands%wheel all =( All Then modify the user to belong to the root group (wheel) with the following command:
profile, this method is permanent for all users.A) Open the profile fileVim/etc/profileb) Add the MONGO directive to the path of the profile file. Add ":/usr/local/webserver/mongo/bin" after path, = cannot have any spaces on either side of the equal sign.Path= $PATH:/usr/local/webserver/mongo/binc) Execute the instructions so that the profile changes take effect immediately.Source Profile(3)
How to add a disk to a linux server ?, Add
To record how to add a disk to a linux server, follow these steps:
View device information formatting Create File System create mount point mount file system set boot Mount view device information
$ sudo fdisk -l
Use the above comma
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.