Samba & Vsftp

1、建立samba共享,共享目錄為/data,要求:(描述完整的過程)

  1)共享名為shared,工作組為magedu;

  2)添加組develop,添加用戶gentoo,centos和ubuntu,其中gentoo和centos以develop為附加組,ubuntu不屬于develop組;密碼均為用戶名;

  3)添加samba用戶gentoo,centos和ubuntu,密碼均為“mageedu”;

  4)此samba共享shared僅允許develop組具有寫權限,其他用戶只能以只讀方式訪問;

  5)此samba共享服務僅允許來自于172.16.0.0/16網絡的主機訪問;

SERVER端:

OS版本CentOS7

ip:192.168.150.137

安裝samba服務

 ~]# yum install samba -y     

創建用戶及組

~]# groupadd develop

~]# useradd gentoo -G develop

~]# useradd centos -G develop

~]# useradd ubuntu

~]# echo "gentoo" | passwd –stdin gentoo

更改用戶 gentoo 的密碼 。

passwd:所有的身份驗證令牌已經成功更新。

~]# echo "centos" | passwd –stdin centos

更改用戶 centos 的密碼 。

passwd:所有的身份驗證令牌已經成功更新。

~]# echo "ubuntu" | passwd –stdin ubuntu

更改用戶 ubuntu 的密碼 。

passwd:所有的身份驗證令牌已經成功更新。

添加samba用戶:此用戶必須是OS用戶,但密碼非為OS用戶的密碼,而是訪問SAMBA服務的專用密碼

~]# smbpasswd -a gentoo

New SMB password:

Retype new SMB password:

Added user gentoo.

~]# smbpasswd -a centos

New SMB password:

Retype new SMB password:

Added user centos.

~]# smbpasswd -a ubuntu

New SMB password:

Retype new SMB password:

Mismatch – password unchanged.

Unable to get new password.

~]# smbpasswd -a ubuntu

New SMB password:

Retype new SMB password:

Added user ubuntu.

創建需要共享的目錄并授予權限

~]# mkdir /data

~]# ls -ld /data

drwxr-xr-x 2 root root 6 12月 20 21:34 /data

~]# chmod g+w /data/     此時需要給develop的group添加組寫權限,不然后續就算在配置文件中添加了寫權限也沒用

~]# chown .develop /data

~]# ls -ld /data

drwxrwxr-x 2 root develop 6 12月 20 21:34 /data

修改配置文檔,配置文檔路徑為/etc/sabma/smb.conf

~]# cd /etc/samba/

samba]# ls

lmhosts  smb.conf  smb.conf.example

samba]# cp smb.conf{,.bak}

samba]# vim smb.conf

[global]

    workgroup = SAMBA

    security = user

    passdb backend = tdbsam

    printing = cups

    printcap name = cups

    load printers = yes

    cups options = raw

    host allow = 192.168.150.0/24      設定允許訪問的網段   

[homes]

    comment = Home Directories

    valid users = %S, %D%w%S

    browseable = No

    read only = No

    inherit acls = Yes

[printers]

    comment = All Printers

    path = /var/tmp

    printable = Yes

    create mask = 0600

    browseable = No

[print$]

    comment = Printer Drivers

    path = /var/lib/samba/drivers

    write list = root

    create mask = 0664

    directory mask = 0775

[shared]     設定共享名

    comment = data

    path= /data/     共享目錄

    public = no     是否是公開的服務

    valid users = gentoo,centos,ubuntu,@develop     授權用戶

    read list = ubuntu   定義只讀用戶

    write list = @develop     定義可寫用戶組

注意:writable和write list不應該同時使用;

開啟samba服務

samba]# systemctl start smb.service

samba]# ss -tnpl

State      Recv-Q Send-Q Local Address:Port               Peer Address:Port             

LISTEN     0      50                *:139                           *:*                   

users:(("smbd",pid=2445,fd=38))LISTEN     0      128               *:22                            *:*                   

users:(("sshd",pid=1077,fd=3))LISTEN     0      100       127.0.0.1:25                            *:*                   

users:(("master",pid=1415,fd=13))LISTEN     0      50                *:445                           *:*                   

users:(("smbd",pid=2445,fd=37))LISTEN     0      50               :::139                          :::*                   

users:(("smbd",pid=2445,fd=36))LISTEN     0      128              :::22                           :::*                   

users:(("sshd",pid=1077,fd=4))LISTEN     0      100             ::1:25                           :::*                   

users:(("master",pid=1415,fd=14))LISTEN     0      50               :::445                          :::*                   

users:(("smbd",pid=2445,fd=35))

client端測試

安裝samba-client

~]# yum -y install samba-client

訪問測試:

centos用戶可讀寫

~]# smbclient //192.168.150.137/shared -U centos

Enter centos's password:

Domain=[SAMBA] OS=[Windows 6.1] Server=[Samba 4.4.4]

smb: \> ls

  .                                   D        0  Tue Dec 20 21:34:53 2016

  ..                                 DR        0  Tue Dec 20 21:34:53 2016

        56220 blocks of size 524288. 39095 blocks available

smb: \> mkdir centos

smb: \> ls

  .                                   D        0  Tue Dec 20 21:53:16 2016

  ..                                 DR        0  Tue Dec 20 21:34:53 2016

  centos                              D        0  Tue Dec 20 21:53:16 2016

        56220 blocks of size 524288. 39095 blocks available

smb: \> exit

ubuntu用戶只讀

~]# smbclient //192.168.150.137/shared -U ubuntu

Enter ubuntu's password:

Domain=[SAMBA] OS=[Windows 6.1] Server=[Samba 4.4.4]

smb: \> ls

  .                                   D        0  Tue Dec 20 21:53:16 2016

  ..                                 DR        0  Tue Dec 20 21:34:53 2016

  centos                              D        0  Tue Dec 20 21:53:16 2016

        56220 blocks of size 524288. 39095 blocks available

smb: \> mkdir ubuntu

NT_STATUS_MEDIA_WRITE_PROTECTED making remote directory \ubuntu

smb: \> exit

2、搭建一套文件vsftp文件共享服務,共享目錄為/ftproot,要求:(描述完整的過程)

  1)基于虛擬用戶的訪問形式;

  2)匿名用戶只允許下載,不允許上傳;

  3)禁錮所有的用戶于其家目錄當中;

  4)限制最大并發連接數為200:;

  5)匿名用戶的最大傳輸速率512KB/s

  6)虛擬用戶的賬號存儲在mysql數據庫當中。

  7)數據庫通過NFS進行共享。

環境介紹:

192.168.150.138

OS:CentOS 7

提供服務:NFS,mariadb的數據存放

192.168.150.137

OS:CentOS 7

提供服務:vsftp mariadb

192.168.150.136

OS:CentOS 6

client

NFS配置

192.168.150.138,NFS服務器端配置

安裝nfs-utils

~]# yum -y install nfs-utils

創建提供NFS服務的目錄

~]# mkdir -p /data

~]# chmod 777 /data

修改配置文件

 ~]# vim /etc/exports

/data 192.168.150.0/24(rw,no_root_squash) 此處需要注意一定要及no_root_squash選項,給共享文件夾授予對方root的權限,不然開啟mysql是由于無法修改文件夾屬組而無法開啟

~]# exportfs -r

~]# systemctl start nfs.service

~]# ss -tnl     nsf服務的端口為2049

State      Recv-Q Send-Q Local Address:Port               Peer Address:Port             

LISTEN     0      128               *:46985                         *:*                 

LISTEN     0      128               *:111                           *:*                 

LISTEN     0      128               *:20048                         *:*                 

LISTEN     0      128               *:22                            *:*                 

LISTEN     0      100       127.0.0.1:25                            *:*                 

LISTEN     0      64                *:36794                         *:*                 

LISTEN     0      64                *:2049                          *:*                 

LISTEN     0      128              :::60746                        :::*                 

LISTEN     0      128              :::111                          :::*                 

LISTEN     0      128              :::20048                        :::*                 

LISTEN     0      128              :::22                           :::*                 

LISTEN     0      100             ::1:25                           :::*                 

LISTEN     0      64               :::52763                        :::*                 

LISTEN     0      64               :::2049                         :::* 

192.168.150.137客戶端配置

安裝nfs-utils

~]# yum -y install nfs-utils

查看共享

~]# showmount -e 192.168.150.138

Export list for 192.168.150.138:

/data 192.168.150.0/24

創建本地目錄并進行掛載

~]# mkdir -p /data

~]# mount -t nfs 192.168.150.138:/data /data

~]# df -h

文件系統                 容量  已用  可用 已用% 掛載點

/dev/mapper/centos-root   28G  8.4G   20G   31% /

devtmpfs                 479M     0  479M    0% /dev

tmpfs                    489M     0  489M    0% /dev/shm

tmpfs                    489M  6.6M  483M    2% /run

tmpfs                    489M     0  489M    0% /sys/fs/cgroup

/dev/sda1                497M  125M  373M   25% /boot

tmpfs                     98M     0   98M    0% /run/user/0

192.168.150.138:/data     28G  8.4G   20G   31% /data

權限測試:

~]# cd /data

data]# vim test

data]# ls

test

mysql創建并進行相關設定

192.168.150.137進行

Centos7需要對pam_mysql_0.7RC1包進行編譯安裝

安裝編譯安裝所需包

~]#yum -y groupinstall "Development Tools" "Server Platform Develoment"

安裝mysql,及相關包

~]# yum -y install mariadb-server mariadb-devel openssl-devel pam-devel

pam_mysql的編譯安裝

~]# tar xf pam_mysql-0.7RC1.tar.gz

~]# cd pam_mysql-0.7RC1

pam_mysql-0.7RC1]# ./configure –with-mysql=/usr –with-openssl=/usr –wit

h-pam=/usr –with-pam-mods-dir=/lib64/security

pam_mysql-0.7RC1]# make && make install

pam_mysql-0.7RC1]# ls /lib64/security/ |grep pam_mysql  查看編譯安裝后pam_mysql.so是否存在

pam_mysql.la

pam_mysql.so

初始化mysql配置文件,將數據庫文件指向nfs掛載目錄/data

~]#vim /etc/my.cnf

datadir=/data

開啟mysql進行用戶及表的創建

~]# systemctl start mariadb.service

~]# ls /data     數據庫文件已經存放在掛載的nfs盤下面

aria_log.00000001  ibdata1      ib_logfile1  performance_schema

aria_log_control   ib_logfile0  mysql        test

~]# ss -tnl     3306正常監聽

State      Recv-Q Send-Q Local Address:Port               Peer Address:Port             

LISTEN     0      50                *:3306                          *:*                 

LISTEN     0      128               *:111                           *:*                 

LISTEN     0      128               *:22                            *:*                 

LISTEN     0      100       127.0.0.1:25                            *:*                 

LISTEN     0      128               *:51102                         *:*                 

LISTEN     0      64                *:39716                         *:*                 

LISTEN     0      128              :::111                          :::*                 

LISTEN     0      128              :::45396                        :::*                 

LISTEN     0      128              :::22                           :::*                 

LISTEN     0      100             ::1:25                           :::*                 

LISTEN     0      64               :::46657                        :::* 

~]# mysql

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 2

Server version: 5.5.52-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> CREATE DATABASE vsftpd;

Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> use vsftpd;

Database changed

MariaDB [vsftpd]> CREATE TABLE users (

    -> id int AUTO_INCREMENT NOT NULL PRIMARY KEY,

    -> name char(30) NOT NULL,

    -> password char(48) binary NOT NULL );

Query OK, 0 rows affected (0.01 sec)

MariaDB [vsftpd]> DESC users

    -> ;

+———-+———-+——+—–+———+—————-+

| Field    | Type     | Null | Key | Default | Extra          |

+———-+———-+——+—–+———+—————-+

| id       | int(11)  | NO   | PRI | NULL    | auto_increment |

| name     | char(30) | NO   |     | NULL    |                |

| password | char(48) | NO   |     | NULL    |                |

+———-+———-+——+—–+———+—————-+

3 rows in set (0.00 sec)

MariaDB [vsftpd]> INSERT INTO users(name,password) VALUES ('tom',password('oracleadmin'));

Query OK, 1 row affected (0.01 sec)

MariaDB [vsftpd]> INSERT INTO users(name,password) VALUES ('jerry',password('oracleadmin')

);Query OK, 1 row affected (0.00 sec)

MariaDB [vsftpd]> SELECT * FROM users;

+—-+——-+——————————————-+

| id | name  | password                                  |

+—-+——-+——————————————-+

|  1 | tom   | *81D2898F52A342B0B5E52CB747519B10342BD069 |

|  2 | jerry | *81D2898F52A342B0B5E52CB747519B10342BD069 |

+—-+——-+——————————————-+

2 rows in set (0.00 sec)

MariaDB [vsftpd]> GRANT select ON vsftpd.* TO vsftpd@localhost IDENTIFIED BY 'oracleadmin'

;Query OK, 0 rows affected (0.00 sec)

MariaDB [vsftpd]> GRANT select ON vsftpd.* TO vsftpd@'127.0.0.1' IDENTIFIED BY 'oracleadmi

n';Query OK, 0 rows affected (0.00 sec)

MariaDB [vsftpd]> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.00 sec)

MariaDB [vsftpd]> exit

Bye

測試連接

[root@localhost ~]# mysql -uvsftpd -poracleadmin

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 4

Server version: 5.5.52-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> SHOW DATABASES;

+——————–+

| Database           |

+——————–+

| information_schema |

| test               |

| vsftpd             |

+——————–+

3 rows in set (0.00 sec)

MariaDB [(none)]> use vsftpd

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

Database changed

MariaDB [vsftpd]> SELECT * FROM users;

+—-+——-+——————————————-+

| id | name  | password                                  |

+—-+——-+——————————————-+

|  1 | tom   | *81D2898F52A342B0B5E52CB747519B10342BD069 |

|  2 | jerry | *81D2898F52A342B0B5E52CB747519B10342BD069 |

+—-+——-+——————————————-+

2 rows in set (0.00 sec)

創建并修改與pamd的連接文件

在pam.d目錄中創建vsftpd.mysql文件

~]# cd /etc/pam.d/

pam.d]# vim vsftpd.mysql    此文件中所涉及的參數可以在pam_mysql-0.7RC1文件的README中查看

pam_mysql-0.7RC1]# less README |more

pam_mysql – A PAM authentication module against MySQL database.

$Id: README,v 1.8.2.9 2006/01/09 10:35:59 moriyoshi Exp $

pam.d]# cat vsftpd.mysql     crypt=2使用mysql password方法加密

auth required pam_mysql.so user=vsftpd passwd=oracleadmin host=localhost db=vsftpd table=users userco lumn=name passwdcolumn=password crypt=2      (Use MySQL PASSWORD() function)

account required pam_mysql.so user=vsftpd passwd=oracleadmin host=localhost db=vsftpd table=users use rcolumn=name passwdcolumn=password crypt=2

創建虛擬賬戶所對應的實體賬號,并進行vsftpd的配置文件修改

創建賬號并進行目錄創建和權限修改

pam.d]# useradd -s /sbin/nologin -d /ftproot vuser

pam.d]# ls -ld /ftproot/

drwx—— 2 vuser vuser 59 11月  9 15:16 /ftproot/

pam.d]# chmod go+rx /ftproot/

pam.d]# ls -ld /ftproot/

drwxr-xr-x 2 vuser vuser 59 11月  9 15:16 /ftproot/

pam.d]# chmod -w /ftproot/

pam.d]# mkdir /ftproot/{pub,upload}

安裝vsftpd

~]# yum -y install vsftpd

修改vsftpd的配置文件添加guest_enable=YES guest_username=vuser pam_service_name=vsftpd.mysql,可以通過man vsftpd.conf進行參數確認并查看

[root@localhost pam.d]# vim /etc/vsftpd/vsftpd.conf

guest_enable=YES

guest_username=vuser

pam_service_name=vsftpd.mysql

]# systemctl start vsftpd.service

]# ss -tnl

State       Recv-Q Send-Q     Local Address:Port                    Peer Address:Port

LISTEN      0      50                     *:3306                               *:*

LISTEN      0      128                    *:22                                 *:*

LISTEN      0      100            127.0.0.1:25                                 *:*

LISTEN      0      32                    :::21                                :::*

LISTEN      0      128                   :::22                                :::*

LISTEN      0      100                  ::1:25                                :::*

測試:

– 連接性測試:

[root@localhost pam.d]# ftp 192.168.150.137

Connected to 192.168.150.137 (192.168.150.137).

220 (vsFTPd 3.0.2)

Name (192.168.150.137:root): tom

331 Please specify the password.

Password:

230 Login successful.

Remote system type is UNIX.

Using binary mode to transfer files.

ftp> ls

227 Entering Passive Mode (192,168,150,137,84,48).

150 Here comes the directory listing.

drwxr-xr-x    2 0        0               6 Nov 09 07:21 pub

drwxr-xr-x    2 0        0               6 Nov 09 07:21 upload

226 Directory send OK.

ftp> bye

221 Goodbye.

[root@localhost pam.d]# ftp 192.168.150.137

Connected to 192.168.150.137 (192.168.150.137).

220 (vsFTPd 3.0.2)

Name (192.168.150.137:root): jerry

331 Please specify the password.

Password:

230 Login successful.

Remote system type is UNIX.

Using binary mode to transfer files.

ftp> ls

227 Entering Passive Mode (192,168,150,137,181,119).

150 Here comes the directory listing.

drwxr-xr-x    2 0        0               6 Nov 09 07:21 pub

drwxr-xr-x    2 0        0               6 Nov 09 07:21 upload

226 Directory send OK.

ftp> exit

221 Goodbye.

均可以通過mysql中添加的賬戶密碼進行vsftp登入

– 文件上傳下載測試

pam.d]# chown vuser /ftproot/upload/           upload文件夾添加vuser的用戶權限

[root@localhost pam.d]# ls -ld /ftproot/upload/

drwxr-xr-x 2 vuser root 6 11月  9 15:21 /ftproot/upload/

pam.d]# vim /etc/vsftpd/vsftpd.conf           修改vsftpd.conf的配置文件,運行用戶上傳操作,修改完后重啟vsftpd服務

anon_upload_enable=YES

[root@localhost pam.d]# !system

systemctl restart vsftpd.service

pam.d]# ftp 192.168.150.137

Connected to 192.168.150.137 (192.168.150.137).

220 (vsFTPd 3.0.2)

Name (192.168.150.137:root): tom

331 Please specify the password.

Password:

230 Login successful.

Remote system type is UNIX.

Using binary mode to transfer files.

ftp> cd upload

250 Directory successfully changed.

ftp> lcd /etc

Local directory now /etc

ftp> put fstab

local: fstab remote: fstab

227 Entering Passive Mode (192,168,150,137,205,67).

150 Ok to send data.

226 Transfer complete.

465 bytes sent in 1.8e-05 secs (25833.33 Kbytes/sec)

ftp> bye

221 Goodbye.

[root@localhost pam.d]# ftp 192.168.150.137

Connected to 192.168.150.137 (192.168.150.137).

220 (vsFTPd 3.0.2)

Name (192.168.150.137:root): jerry

331 Please specify the password.

Password:

230 Login successful.

Remote system type is UNIX.

Using binary mode to transfer files.

ftp> cd upload

250 Directory successfully changed.

ftp> lcd /etc

Local directory now /etc

ftp> put issue

local: issue remote: issue

227 Entering Passive Mode (192,168,150,137,187,178).

150 Ok to send data.

226 Transfer complete.

23 bytes sent in 5.9e-05 secs (389.83 Kbytes/sec)

ftp> bye

221 Goodbye.

– 用戶權限分類型測試

將mysql中的用戶區分為可以上傳和無法上傳兩個權限

pam.d]# cd /etc/vsftpd/

vsftpd]# vim vsftpd.conf 將anon_upload_enable=YES功能關閉

#anon_upload_enable=YES

創建vuser.conf.d目錄并進行各用戶單獨配置文件創建,配置文件中單獨設定anon_upload_enable此功能是否開啟

vsftpd]# ls

ftpusers  user_list  vsftpd.conf  vsftpd_conf_migrate.sh

vsftpd]# mkdir vusers.conf.d

vsftpd]# cd vusers.conf.d/

vusers.conf.d]# vim tom

vusers.conf.d]# cp tom jerry

vusers.conf.d]# vim jerry

vusers.conf.d]# cat {tom,jerry}

anon_upload_enable=YES

anon_upload_enable=NO

修改vsftpd.conf添加參數user_config_dir=/etc/vsftpd/vusers.conf.d,進行單獨用戶配置文件的連接,修改完成后重啟vsftpd服務

vusers.conf.d]# cd ..

vsftpd]# ls

ftpusers  user_list  vsftpd.conf  vsftpd_conf_migrate.sh  vusers.conf.d

vsftpd]# vim vsftpd

vsftpd]# vim vsftpd.conf

user_config_dir=/etc/vsftpd/vusers.conf.d

[root@localhost vsftpd]# systemctl restart vsftpd.service

測試

此用戶可以上傳

vsftpd]# ftp 192.168.150.137

Connected to 192.168.150.137 (192.168.150.137).

220 (vsFTPd 3.0.2)

Name (192.168.150.137:root): tom

331 Please specify the password.

Password:

230 Login successful.

Remote system type is UNIX.

Using binary mode to transfer files.

ftp> cd upload

250 Directory successfully changed.

ftp> lcd /etc

Local directory now /etc

ftp> ls

227 Entering Passive Mode (192,168,150,137,166,0).

150 Here comes the directory listing.

-rw——-    1 1000     1000          465 Nov 09 07:25 fstab

-rw——-    1 1000     1000           23 Nov 09 07:26 issue

226 Directory send OK.

ftp> lcd /etc

Local directory now /etc

ftp> put grub2.cfg

local: grub2.cfg remote: grub2.cfg

227 Entering Passive Mode (192,168,150,137,46,19).

150 Ok to send data.

226 Transfer complete.

4265 bytes sent in 0.0286 secs (149.04 Kbytes/sec)

ftp> bye

221 Goodbye.

此用戶禁用上傳

vsftpd]# ftp 192.168.150.137

Connected to 192.168.150.137 (192.168.150.137).

220 (vsFTPd 3.0.2)

Name (192.168.150.137:root): jerry

331 Please specify the password.

Password:

230 Login successful.

Remote system type is UNIX.

Using binary mode to transfer files.

ftp> cd upload

250 Directory successfully changed.

ftp> ls

227 Entering Passive Mode (192,168,150,137,62,132).

150 Here comes the directory listing.

-rw——-    1 1000     1000          465 Nov 09 07:25 fstab

-rw——-    1 1000     1000         4265 Nov 09 07:31 grub2.cfg

-rw——-    1 1000     1000           23 Nov 09 07:26 issue

226 Directory send OK.

ftp> lcd /etc

Local directory now /etc

ftp> !ls

adjtime             e2fsck.conf  ld.so.conf        polkit-1    shadow-

aliases             environment  ld.so.conf.d        popt.d        shells

aliases.db         ethertypes   libaudit.conf        postfix        skel

alternatives         exports      libnl            ppp        ssh

anacrontab         favicon.png  libuser.conf        prelink.conf.d    ssl

asound.conf         filesystems  locale.conf        printcap    statetab

audisp             firewalld    localtime            profile        statetab.d

audit             fstab          login.defs        profile.d    subversion

avahi             gcrypt       logrotate.conf        protocols    sudo.conf

bash_completion.d     gdbinit      logrotate.d        python        sudoers

bashrc             gdbinit.d    lvm            rc0.d        sudoers.d

binfmt.d         gnupg          machine-id        rc1.d        sudo-ldap.conf

centos-release         GREP_COLORS  magic            rc2.d        sysconfig

centos-release-upstream  groff          makedumpfile.conf.sample    rc3.d        sysctl.conf

chkconfig.d         group          man_db.conf        rc4.d        sysctl.d

cron.d             group-       mke2fs.conf        rc5.d        systemd

cron.daily         grub2.cfg    modprobe.d        rc6.d        system-release

cron.deny         grub.d       modules-load.d        rc.d        system-release-cpe

cron.hourly         gshadow      motd            rc.local    tcsd.conf

cron.monthly         gshadow-     mtab            rdma        terminfo

crontab             gss          my.cnf            redhat-release    tmpfiles.d

cron.weekly         host.conf    my.cnf.d            resolv.conf    tuned

crypttab         hostname     NetworkManager        rpc        udev

csh.cshrc         hosts          networks            rpm        vconsole.conf

csh.login         hosts.allow  nsswitch.conf        rsyncd.conf    vimrc

dbus-1             hosts.deny   nsswitch.conf.bak        rsyslog.conf    virc

default             init.d       openldap            rsyslog.d    vsftpd

depmod.d         inittab      opt            rwtab        wpa_supplicant

dhcp             inputrc      os-release        rwtab.d        X11

DIR_COLORS         iproute2     pam.d            sasl2        xdg

DIR_COLORS.256color     issue          passwd            securetty    xinetd.d

DIR_COLORS.lightbgcolor  issue.net    passwd-            security    yum

dnsmasq.conf         kdump.conf   pkcs11            selinux        yum.conf

dnsmasq.d         kernel       pki            services    yum.repos.d

dracut.conf         krb5.conf    plymouth            sestatus.conf

dracut.conf.d         ld.so.cache  pm            shadow

ftp> put resolv.conf

local: resolv.conf remote: resolv.conf

227 Entering Passive Mode (192,168,150,137,44,37).

550 Permission denied.

ftp> bye

221 Goodbye.

原創文章,作者:N23-蘇州-void,如若轉載,請注明出處:http://www.www58058.com/64294

(0)
N23-蘇州-voidN23-蘇州-void
上一篇 2016-12-20
下一篇 2016-12-20

相關推薦

  • Linux基礎之sed流編輯器詳解

    之前介紹了三大文本編輯器的grep,這里介紹比grep功能更強的sed流編輯器 sed是什么? sed是Stream EDitor的縮寫,man中對sed的簡介為 sed – stream editor for filtering and transforming text 它的主要功能是對文本的過濾與替換。 sed的工作原理 sed的工作過程:…

    Linux干貨 2016-08-15
  • 馬哥教育網絡班22期+第三周課程練習

    1、列出當前系統上所有已經登錄的用戶的用戶名,注意:同一個用戶登錄多次,則只顯示一次即可。     [root@zabbix ~]# who|awk '{print $1}'|sort| uniq 2、取出最后登錄到當前系統的用戶的相關信息。 &nb…

    Linux干貨 2016-08-23
  • Linux終端類型

    前言 終端是一個很重要的外設,用過終端設備的人都知道如果設備類型不對就會有亂字符,也可用仿真終端軟件如netterm試驗一下,Linux的終端信息放在 /usr/share/terminfo下,在這個目錄的子目錄v下就有許多的如vt100,vt102,vt200等,看一下就知道了。 終端類型的區別與概念 1、 pty(虛擬終端): 但是如果我們遠程telne…

    Linux干貨 2016-10-14
  • 第五周

      第五周 1 顯示/boot/grub/grub.conf中以至少一個空白字符開頭的行;      grep "^[[:space:]]\+" /boot/grub/grub.conf 2 顯示/etc/rc.d/rc.sysinit文件中以#開頭,后面跟至…

    Linux干貨 2017-01-02
  • openssh及基于ssl的https的配置

    openssh的簡介             OpenSSH 是 SSH 協議的免費開源實現。SSH協議族可以用來進行遠程控制, 或在計算機之間傳送文件。 而實現此功能的傳統方式,如telnet(終端仿真協議)、 rcp ftp、 rlogin、rs…

    Linux干貨 2017-05-30
  • Shell腳本之流程控制語句

    Shell腳本之流程控制語句 1、 if語句 (1)if 條件;then        action1 else        action2 fi  注意:shell里沒有縮進要求。 (2)if 條件1;then   …

    Linux干貨 2017-04-16

評論列表(1條)

  • 馬哥教育
    馬哥教育 2017-03-29 17:24

    非常好,再接再勵。

欧美性久久久久