How to set Workstation Name on Solaris 10?

Hi.I have problems with setting workstation name.I tryed to do it with Management Console, but system crashed, because there was missmatch between the name in few files. So I installed Solaris 10 again.How to change workstation name?Thank you.
[278 byte] By [TheNetWalker] at [2007-11-26 10:52:08]
# 1
by editing /etc/nodename and run "hostname <new hostname>". Also it might be a good idea to edit /etc/hosts and /etc/hostname.<primary interface> afterwards. .7/M.
mAbrante at 2007-7-7 3:04:57 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 2

Thank you.

There are two /etc/hostname files, they are empty: hostname and hostname6.

/etc/hosts has what I need to change.

I was unable to find /etc/nodename.

Will it work, if I'll change only /etc/hosts and make "hostname <new hostname>"?

In previous time when my system crashed, I changed: /etc/hosts, but it didn't work.

TheNetWalker at 2007-7-7 3:04:57 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...