×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

/etc/host read only???

/etc/host read only???

/etc/host read only???

(OP)
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

RE: /etc/host read only???

/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.

RE: /etc/host read only???

(OP)
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... =(
 

RE: /etc/host read only???

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.

RE: /etc/host read only???

(OP)
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? =(


 

RE: /etc/host read only???

(OP)
sorry if i get u confused..

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close