can't modify hosts file


log in

Advanced search

Questions and Answers : Unix/Linux : can't modify hosts file

Author Message
Profile Geek@Play
Volunteer tester
Avatar
Send message
Joined: 31 Jul 01
Posts: 2460
Credit: 83,761,820
RAC: 29,280
United States
Message 801098 - Posted: 23 Aug 2008, 2:41:56 UTC

Ok........So my PS3 is running Linux (YDL 6.1) and when it contacts the servers at Berkeley it's "Name" is shown as "localhost.localdomain". I wish to modify the contents of the /etc/hosts file to reflect the name I want however, the option to save the file is grayed out in the text editor.

Also I apparently do not have permission to modify anything in the /etc folder.

I know this is easy but I am a complete novice here with Linux. Can anyone help me?
____________
Boinc....Boinc....Boinc....Boinc....

Dotsch
Volunteer tester
Avatar
Send message
Joined: 9 Jun 99
Posts: 2422
Credit: 843,046
RAC: 39
Germany
Message 801223 - Posted: 23 Aug 2008, 9:51:12 UTC

You must edit the file as root.
With "su - root" you can login as root. Not shure, if sudo is configured on YDL. If sudo is configured a "sudo vi /etc/hosts" could help (you could also change the "vi" in the sudo command in your favorite editor...

Profile Geek@Play
Volunteer tester
Avatar
Send message
Joined: 31 Jul 01
Posts: 2460
Credit: 83,761,820
RAC: 29,280
United States
Message 801251 - Posted: 23 Aug 2008, 12:39:01 UTC

Thanks..........logged in as root and made the change. Works great now.

____________
Boinc....Boinc....Boinc....Boinc....

Questions and Answers : Unix/Linux : can't modify hosts file

Copyright © 2014 University of California