Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

/etc/host read only???

Status
Not open for further replies.

uzumaki

Technical User
Aug 16, 2007
529
0
0
SG
i am trying to set up ifconfig in solaris unix but when i do
ls -l /etc/hosts it shows:

lrwxrwxrwx 1 root root 12 jul 28 04:27 /etc/hosts -> ./inet/hosts

what does this mean? is it appending or redirecting info of /etc/hosts to ./inet/hosts? i tried cat to ./inet/hosts
but says no record.


and when i do vi /etc/hosts and i try to edit it shows read only even if i am login as root.


i tried to see whether there is an option to make file editable but no. i do know know how... i want to try adding new network interface...please help
 
/etc/hosts is a link to /etc/inet/hosts (this is what is meant by the l at the beginning of the permissions in your ls -l command.

Although the /etc/hosts file says that it is read only, even when opened by root, this can be overridden (again only by root) by editing the file and then saving it with wq! which overwrites the file regardless of the read only setting. That said, be careful, files like these are read-only for a reason and shouldn't be tampered with if you don't know what the effects of the chages you're making might be!

The internet - allowing those who don't know what they're talking about to have their say.
 
i was login using root however when i put on command :wq it says file read only... the file im trying to access the file /etc/hosts, file shows

127.0.0.1 local host
10.203.206.27 BDL09493A4 BDL09493A4.tmp.domain.net loghost
192.168.1.1 cmssvr-c
192.168.1.2 cmssvc-c
192.168.2.2 switch
10.203.206.28 BDL09493A4_1
10.203.206.133 buck_pbx

i tried again today what you said, i do not know what happened but somehow one of my colleague configure something that made me edit the /etc/hosts file using wq or wq! when i am on root.

i tried investigating using history and saw this:
la
ls
pwd
ls -la
more .sh_history
ls
cd nxgen
mkdir nxgen
cp .sh_history /nxgen/history_12112010
clear
su cms cms
cmssvc
cmsadm
cmsadm
cmsadm
shutdown -y -g0 -i6

when i came to station, it is on login screen before CDE, when i type in any command, it shows:

INIT: Command is respawning too rapidly. Check errors.
id : ob "/opt/0rbixMT/bin/orbixsh < /dev/null > /dev/null 2>&1
.

when i turn cms on, and restart the server this thing is gone.. so i thats when i tried editing /etc/hosts and now working, which one corrected the issue about this? i can still see that the file /etc/hosts is still link to /etc/inet/hosts because of lrwxrwxrwx.... my headspins now... =(
 
Sorry, I think I have lost track of where we are with this!

The internet - allowing those who don't know what they're talking about to have their say.
 
oh i mean it is working now for some reason i can edit the /etc/hosts file now when i do vi and save using wq or wq!

it seems like someone access the server so i check the command history and found the list of commands that the person use which is below:

la
ls
pwd
ls -la
more .sh_historyls
cd nxgen
mkdir nxgen
cp .sh_history /nxgen/history_12112010
clear
su cms cms
cms
svc
cmsadm
cmsadm
cmsadm
shutdown -y -g0 -i6

...but i dont know which command that the person used that made the file to be edited even if its still read only. one thing that made me feel someone use the server aside from me is because i saw this:

INIT: Command is respawning too rapidly. Check errors.id : ob "/opt/0rbixMT/bin/orbixsh < /dev/null > /dev/null 2>&1

i dont know how to explain and understand how suddenly the /etc/hosts file with permission lrwxrwxrwx works now....

any explanation for this? =(


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top