在Solaris系统中,查看tcp/ip配置

在Solaris系统中,修改tcp/ip配置是比较繁琐的事情

本机机器名                                                    /etc/hostname.pcn0
指向/etc/inet/hosts的软链接,记录IP地址和机器名的对应关系       /etc/hosts
指向/etc/inet/netmasks的软链接,记录网络地址和子网掩码的对应关系 /etc/netmasks
默认网关                                                      /etc/defaultrouter

 

# cd /etc
# ls host*
hostname.ce0  hosts
# more hostname*
j**db
# more hosts
#
# Internet host table
#
127.0.0.1       localhost
192.168.1.115    j**db   loghost
# more netmasks
#
# The netmasks file associates Internet Protocol (IP) addres
# masks with IP network numbers.
#
#       network-number  netmask
#
# The term network-number refers to a number obtained from t
# Information Center.
#
# Both the network-number and the netmasks are specified in
# "decimal dot" notation, e.g:
#
#               128.32.0.0 255.255.255.0
#
192.168.1.0     255.255.255.0
# more defaultrouter
192.168.1.1
# more defaultdomain
defaultdomain: 无此文件或目录
# cd inet
# more ipnodes
#
# Internet host table
#
::1     localhost
127.0.0.1       localhost
192.168.1.115    j**db   loghost
# more hosts
#
# Internet host table
#
127.0.0.1       localhost
192.168.1.115    j**db   loghost
# more netmasks
#
# The netmasks file associates Internet Protocol (IP) addres
# masks with IP network numbers.
#
#       network-number  netmask
#
# The term network-number refers to a number obtained from t
# Information Center.
#
# Both the network-number and the netmasks are specified in
# "decimal dot" notation, e.g:
#
#               128.32.0.0 255.255.255.0
#
192.168.1.0     255.255.255.0
#
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index
1
        inet 127.0.0.1 netmask ff000000
ce0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.1.115 netmask ffffff00 broadcast 192.168.1.255
        ether 0:3:ba:db:ec:f1
#
默认ftp服务是启动的,但不允许root访问,这个问题困扰我1周时间了,开始一直改的是sshd的配置文件,后来又google了很久,发现应该改ftpd的配置文件。
让root能够登录,需要修改/etc/ftpd/ftpusers,将root用户注释掉,此文件夹下包含所有被拒绝访问的用户

# cd /etc/ftpd
# pwd
/etc/ftpd
# more ftpusers
# ident "@(#)ftpusers   1.5     04/02/20 SMI"
#
# List of users denied access to the FTP server, see ftpusers(4).
#
#root
daemon
bin
sys
adm
lp
uucp
nuucp
smmsp
listen
gdm
webservd
nobody
noaccess
nobody4
==========================================

# more /etc/nodename
j**db
# more /etc/hostname.ce0
j**db
# more /etc/hosts
#
# Internet host table
#
127.0.0.1       localhost
192.168.1.115    j**db   loghost
# more /etc/netmasks
#
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
#
#       network-number  netmask
#
# The term network-number refers to a number obtained from the Internet Network
# Information Center.
#
# Both the network-number and the netmasks are specified in
# "decimal dot" notation, e.g:
#
#               128.32.0.0 255.255.255.0
#
192.168.1.0     255.255.255.0
# more /etc/defaultrouter
192.168.1.1
# more /etc/resolv.conf
/etc/resolv.conf: 无此文件或目录
# more /etc/nsswitch.conf
#
# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.

passwd:     files
group:      files
hosts:      files
ipnodes:    files
networks:   files
protocols:  files
rpc:        files
ethers:     files
netmasks:   files
bootparams: files
publickey:  files
# At present there isn't a 'files' backend for netgroup;  the system will
#   figure it out pretty quickly, and won't use netgroups at all.
netgroup:   files
automount:  files
aliases:    files
services:   files
printers:       user files

auth_attr:  files
prof_attr:  files
project:    files
#

===================================================

#ifconfig –a 列出本机所配网卡及其配置情况;
#ifconfig e1000g1 down,将需要重新配的网卡down掉;
#ifconfig e1000g1 192.168.1.1 netmask 255.255.255.0 up 重新配置IP地址并启动;

===================================================

posted @ 2012-07-09 19:47  emanlee  阅读(4721)  评论(1编辑  收藏  举报