Linux--facl and Users and Linux terminals

Source: Internet
Author: User

File system access list

Facl:filesystem Access Control List

Save additional access control permissions with file extensions

Setfacl

-M: Set

U:uid:perm

G:gid:perm

-X Cancel

Setfacl-x u:hive five.sh

Getfacl

Several commands:

W:show who was logged on and what they was doing

Who:show who's logged on

Every 5 seconds, check to see if Hadoop is logged in, such as logging in, showing that it is logged in, and exiting

Sleep

Whoami:print effective UserID

Last: Displays the/var/log/wtmp file, showing the user login history and System restart history

-N #: Displays information about recent # times

LASTB:/var/log/btmp file, displaying user error login attempts

-N #:

Lastlog: Displays the last successful login information for each user;

-U USERNAME: Displays recent login information for a specific user

BaseName:

$: Script path and name when executing script

Mail:

Hostname: Display host name

If the host name of the current host is empty, or (none), or ckh.com, change it to Localhost.localdomain

[-Z ' hostname '] | | [' hostname ' = = ' (none) '-o ' hostname ' = = ' ckh.com '] && hostname localhost.localdomain

Generate random numbers

random:0-32768

Random number generator: Entropy pool

/dev/random:

/dev/urandom:

Terminal type:

Console: Consoles

pty#: Physical Terminal (VGA)

tty#: Virtual Terminal (VGA)

ttys#: Serial Terminal

pts/#: Pseudo Terminal

Write a script that generates 10 random numbers using random, and finds the maximum and minimum values;

#!/bin/Bash#declare-I. max=0Declare-I. min=0 forIinch{1..Ten}; DoMyrand=$RANDOM [$I-eq1] && min=$MYRANDif[$I-le9]; Then        Echo-N"$MYRAND,"    Else        Echo "$MYRAND"    fi[$MYRAND-GT $MAX] && max=$MYRAND [$MYRAND-lt $MIN] && min=$MYRAND Done

Linux--facl and Users and Linux terminals

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.