在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地址並啟動;

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM