Operating System - HP-UX
1819736 Members
2848 Online
109606 Solutions
New Discussion юеВ

Re: getting ip address of hp-ux server

 
SOLVED
Go to solution
Santha
Occasional Contributor

getting ip address of hp-ux server

Hello everybody,
How to get ip address of HP-UX server.Which command is used or any file is there to check ip address.Another doubt i am unable to change my password in unix server as i have been given a new user and password.If i try using passwd command it is giving u may not change this password.How can i go about it.Advanced thanks for reply.
4 REPLIES 4
Todd Whitcher
Esteemed Contributor
Solution

Re: getting ip address of hp-ux server

You can use several commands to see your IP address.

# netstat -in

# ifconfig lanX where X = your Interface PPA#

You can use commands like nslookup, getip, nsquery and dig to look up hostnames and IP's.

This information is configured in /etc/rc.config.d/netconf.

You can also use SAM to view your network information.

Some examples:



# netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan0 1500 16.113.144.0 16.113.145.151 1592101 0 698993 0 0
lo0 4136 127.0.0.0 127.0.0.1 58268 0 58268 0 0
# ifconfig lan0
lan0: flags=843
inet 16.113.145.151 netmask fffffe00 broadcast 16.113.145.255
# getip vick1
16.113.145.151
# nslookup vick1
Name Server: atl-resolver.americas.hp.net
Address: 15.227.128.51

Trying DNS
Name: vick1.atl.hp.com
Address: 16.113.145.151

#

You use the passwd command to change your userse password. There may be restrictions on your account, check w/ your administrator.





MarkSyder
Honored Contributor

Re: getting ip address of hp-ux server

The easiest way to get the ip address is:

ping `hostname`

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Steven E. Protter
Exalted Contributor

Re: getting ip address of hp-ux server

The ip address itself is set permenently in the file /etc/rc.config.d/netconf

It can be set/changed on the fly with the ifconfig command.

For the issue at hand, check the permissions on the passwd binary.

Normal permissions:
-r-sr-xr-x 5 root bin 49152 May 23 2001 /usr/bin/passwd*

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Devender Khatana
Honored Contributor

Re: getting ip address of hp-ux server

Hi,

#cat /etc/rc.config.d/netconf |grep IP_ADDRESS

The command will give you all the IPs which are permanently configured and will take place after reboot.

If somebody changed IP using ifconfig command then there may be difference in the IP in the file and current IP. But after reboot only file settings will take effect.

Also see
#lanscan ( For information about all lan interfaces)

HTH,
Devender
Impossible itself mentions "I m possible"