Simple account Search

Source: Internet
Author: User

1: Say hello to each user in the/etc/passwd directory, and indicate its UID number! (Eg:hello,root,your uid is 0)
2: How many accounts does this script share?

#!/bin/bash
a= "/etc/passwd"
b= "/root/b"
if awk-f: ' {print ' Hello, ' $ ', ' ' Your UID is ' $ $ ' $a > $b
Then
Cat $b
awk ' {print $} ' $b |wc-l
fi

[[Email protected] ~]# sh AAA

Hello,root, your UID is 0

Hello,bin, your UID is 1

Hello,daemon, your UID is 2

Hello,adm, your UID is 3

HELLO,LP, your UID is 4

Hello,sync, your UID is 5

Hello,shutdown, your UID is 6

Hello,halt, your UID is 7

Hello,mail, your UID is 8

HELLO,UUCP, your UID is 10

Hello,operator, your UID is 11

Hello,games, your UID is 12

Hello,gopher, your UID is 13

HELLO,FTP, your UID is 14

Hello,nobody, your UID is 99

HELLO,VCSA, your UID is 69

Hello,saslauth, your UID is 499

Hello,postfix, your UID is 89

HELLO,SSHD, your UID is 74

Hello,mysql, your UID is 500

HELLO,PHP-FPM, your UID is 501

HELLO,NTP, your UID is 38

Hello,named, your UID is 25

Hello,zabbix, your UID is 498

Hello,memcached, your UID is 497

Hello,redis, your UID is 503

Hello,mailnull, your UID is 47

Hello,smmsp, your UID is 51

28



This article is from the "Steven Never give Up" blog, please be sure to keep this source http://wsw26.blog.51cto.com/1442148/1755056

Simple account Search

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.