以root身份登录
1.新建用户组用命令
groupadd test
2.添加用户
useradd -d /home/test/bei_1 -s /bin/sh -g test -m bei_1
此命令新建了一个用户bei_1,该用户的登录Shell是/bin/sh,指定用户主目录:/home/test/bei_1,它属于test用户组
passwd bei_1
设置用户bei_1的密码
3.root给用户添加执行命令权限
添加文件的写权限。也就是输入命令:chmod u+w /etc/sudoers。
编辑/etc/sudoers文件。也就是输入命令"vim /etc/sudoers",进入编辑模式,找到这一 行:root ALL=(ALL) ALL在起下面添加一行xxx ALL=(ALL) ALL
(这里的xxx是你的用户名,如bei_1 ALL=(ALL) ALL),然后保存退出。
撤销文件的写权限。也就是输入命令:chmod u-w /etc/sudoers。
3.以bei_1身份登录,然后执行抓包命令
sudo tcpdump tcp -i eth0 -c 3000 -s 0 and src net 10.17.140.141 -w /home/test/bei_1/20151221.pcap
此时会提示需要输入bei_1的登录密码,以验证身份
src net 10.17.140.141:抓取来此IP地址的TCP包
目录/home/test/bei_1:抓取的数据包存放地址
Ctrl+C是停止抓包
4.分析数据
执行ls命令,可以看到抓取的数据包,下载到本地,用工具Wireshark分析

Linux--多用户登录服务器端口抓包的更多相关文章

  1. Linux下unix socket 读写 抓包

    Linux下unix socket 读写 抓包-ubuntuer-ChinaUnix博客 http://blog.chinaunix.net/uid-9950859-id-247877.html

  2. Linux基础:用tcpdump抓包

    简介 网络数据包截获分析工具.支持针对网络层.协议.主机.网络或端口的过滤.并提供and.or.not等逻辑语句帮助去除无用的信息. tcpdump - dump traffic on a netwo ...

  3. Linux下使用tcpdump进行抓包(转)

    技巧: 1.可以通过tcpdump抓取某个网卡的包,然后输出日志文件,通过Wireshark进行分析. 2.可以设置Wifi热点,然后通过手机连接这个热点,然后进行tcpdump的分析.而且在Ubun ...

  4. Linux下面如何用tcpdump抓包

    很多时候我们的系统部署在Linux系统上面,在一些情况下定位问题就需要查看各个系统之间发送数据报文是否正常,下面我就简单讲解一下如何使用tcpdump抓包 tcpdump是Linux下面的一个开源的抓 ...

  5. Linux下Wireshark的网络抓包使用方法

    Wireshark是世界上最流行的网络分析工具.这个强大的工具可以捕捉网络中的数据,并为用户提供关于网络和上层协议的各种信息.与很多其他网络工具一样,Wireshark也使用pcap network ...

  6. tcpdump指定IP和端口抓包

    如下指定抓www.baidu.com 并且80端口的包 保存到test.cap 可以在Windows下面用wireshark打开 tcpdump 'port 80 and host www.baidu ...

  7. Linux环境下使用tcpdump抓包与下载

    (1)报文抓取 tcpdump -i eno5 host 10.8.12.154 -w /test.cap -i:抓取的网卡 host:目的地址 -w:生成的文件存放路径 Ctrl+c 结束抓包,抓取 ...

  8. Linux SSH登录服务器报ECDSA host key "ip地址" for has changed and you have requested strict checking.错误

    Linux SSH命令用了那么久,第一次遇到这样的错误:ECDSA host key "ip地址" for  has changed and you have requested ...

  9. Linux学习之服务器端口查看的方法

    1.用netstat查看: [grid@rac121 admin]$ netstat -anp | grep oracle (Not all processes could be identified ...

随机推荐

  1. <转>Linux 环境进程间通信(六)

    http://www.ibm.com/developerworks/cn/linux/l-ipc/part6/ 一个套接口可以看作是进程间通信的端点(endpoint),每个套接口的名字都是唯一的(唯 ...

  2. iOS开发基础控件--UIButton

    01 //这里创建一个圆角矩形的按钮 02     UIButton *button1 = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 03 ...

  3. struts2 action重定向action中文乱码处理

    比如:Action方法productCategorySave()变量message,传递给Action方法productCategoryAdd(),当变量message为中文变量时,要进行编码设置,不 ...

  4. Perl 变量:哈希变量

    Perl 哈希变量哈希是 key/value 对的集合.Perl中哈希变量以百分号 (%) 标记开始.访问哈希元素格式:${key}. 1.创建哈希创建哈希可以通过以下两种方式: 1.为每个 key ...

  5. cf499B-Lecture 【map】

    http://codeforces.com/problemset/problem/499/B B. Lecture     You have a new professor of graph theo ...

  6. unity3d xml序列化

    using UnityEngine; using System.Collections; using System.Xml; using System.Xml.Serialization; using ...

  7. Renderer.materials 和sharedMaterials一些用法上的区别

    Not allowed to access Renderer.materials on prefab object. Use Renderer.sharedMaterials insteadUnity ...

  8. H5/

    1.value: 2.selected="selected": 设置selected="selected"属性,则该选项就被默认选中. 下拉列表也可以进行多选操 ...

  9. Ubuntu Server 12.04 LTS搭建SVN服务及修改端口

    采用了apache结合svn的方式. 首先安装apache.subversion.svn-apache sudo apt-get install apache2 sudo apt-get instal ...

  10. 257. Binary Tree Paths返回所有深度优先的遍历

    [抄题]: Given a binary tree, return all root-to-leaf paths. For example, given the following binary tr ...