strange computername issue
I run Mandrake 9.1 and I like to change my computername.
To do that permanently i edit my /etc/sysconfig/network to: NETWORKING=yes HOSTNAME="classon" I then do a reboot without any effect. :scratch: The strange thing is that I had RH9 installed before and there it worked. I know I can change the hostname by writing: hostname classon in a terminal but that is just a temporary sullotion. This is really driving me mad. I thought I knew my way around computers but apparently not. |
Is there a /etc/hostname file that contains the hostname? (There is such file in debian.) If
there is, changing it changes the hostname that is set at boot. |
To change the hostname go to rc.sysinit in the /etc/rc.d directory. Change line 30 from "HOSTNAME=localhost" to "HOSTNAME=classon" or whatever you want to name it. You have to have root access to change that file.
When you reboot you should see where it sets the hostname. Hope that helps. :D :D :D :D |
Quote:
It's a trivial matter (I don't run a server or anything...), but I think most of us know how trivial bothers can nag and nag like a tune you can't get out of your head. I can rest easier now, and worry about a million other Linux matters. :D You made my day--no exaggeration. |
Well this raise another problem that occurred when I changed distribution to mdk. I thought that once you were root you had access to all files. But I dont have it now.
I can read the rc.sysinint but cannot write on it. ls -l shows: -rwxr-xr-x 1 root root 33883 Oct 9 22:06 rc.sysinit But when i type: su chmod a+w rc.sysinit I get "Operation not permitted" that is strange. I also here used to be able to edit it. I even now entered my computer in rescuemode but root did not have enough permissions there either. hm... when my computer boots it reads: Setting hostname classon [ok] should not that be enough? Hm... Perhaps it works to add HOSTNAME=classon in /etc/rc.d/rc.sysinit but I cannot test it since I dont have enough access to do it as root. Sigh... Shall I reinstall my whole system just because of this? I installed mdk9.1 on an other machine and there is worked without any problems. |
Quote:
chmod o+rwx ./rc.sysinit before I resorted to reinstalling my system... Don't know if it would work or not, but it looks like it couldn't hurt to try. |
[root@dhcppc2 rc.d]# chmod o+rwx ./rc.sysinit
chmod: ändrar rättigheter på "./rc.sysinit": Operation not permitted Did not work. Very strage indeed. |
I named mine smoker. I went from a 400MHz amchine to the one in my sig below. It smokes OK.
If you are using 9.1 do this: Start thingy then Applications then File Tools then 'File Manager - Super User'. Put in root password. Then use the buttons to get around and go to /etc/rc.d then click on the file rc.sysinit. It should open in Kwrite. If it won't let you change the file then close Kwrite and right click on the file and choose properties. Make sure the following have a 'X' next to it in the permissions tab: User Read Write Exec Group Read Exec <no x for write> Others Read Exec <no x for write> Ownership should be User root Group root If you have that click on it again and it should let you change it. Hope that helps. Post back either way. :D :D :D :D |
This problem bothered me all night! I searched this morning on the Web and found similar problems reported; one was where a user's computer had been hacked (cracked) maliciously at such a basic level that root permissions no longer existed; two or three others just had no solution (yet); and I found a page that described Linux security settings that can be set so strict that even the root user cannot chmod or chown. (But how then would you change the settings back?!)
I will keep looking. Meanwhile I bravely experimented and found I could chmod just fine on that file. Hmm. :( P. S. I had a year of Swedish long, long ago in my university years. I remember only a few words, but I could make out the line in one of your posts, classon--from context! |
Quote:
Is there an other startupscripts like the /etc/rc.d/sysinit? If there is I can att a line "hostname classon" and the problem will be solved. Almost but as good as solved. I run enlightenment and I tried to put it into the initfile of the theme Im running but without any success. Do you know of any other place I could place that piece if code? |
jonr: I dont think that my computer as been hacked/Cracked. Eh... at least I hope so :p
One thought that had occurred to me is about if it is possible to mount the filesystem so that all rights are set from the beginning? Something went wrong when I made my last installation and the installationprogram hang just before the last reboot was going to be. I hoped for the best and did a manual reset (stupid computer! I have the power over you! hm... who am I trying to convince here? :( ) and the system booted fine. So I ran it and started out using enlightenment from start. It might be so that I missed to install some really important file regarding changing rights to a file such as /etc/rc.d/sysinit. But then I can change the rights of a file I (root) made in the same catalog /etc/rc.d/sysinit.old. Quite odd I think. Perhaps I rather do a complete reinstallation? By the way! Im honored seing you talk about that you have tried to learn my language. |
I wish I knew more so I could give good advice here. Before Mandrake 9.1, I had problems with installations hanging up various places, and trusted to luck and everything seemed to turn out OK. I just don't know why you have LOST the ability to chmod certain files, when you did have it before! I know it would make me feel really frustrated and maybe I would think about re-installing--but that brings headaches with it, too, doesn't it...
Re: Swedish studies--I never got very good. My major is in French, and I also can read German and Spanish fairly easily. Swedish seems a good deal more difficult--and I never mastered the "sj" sound at all! :) But I enjoyed learning what I did learn and I feel some accomplishment when I watch a Swedish movie and understand about one phrase every twenty minutes! I'm going to continue to look into this file permission problem. After all, it seems fairly common, and it could happen to me one of these days.... |
I don't understand why root can't chmod a file either. Can you do it the way I mentioned above or do you get a error then to? It should at least let you look at the permissions box.
Strange :confused: :D :D :D |
No. Sorry cannot do that either. I get into that I can click the boxes to change ownership att read/write/exe access but when I klick ok i get an error message saying konquerer made a mistake.
Thaks for the support anyway. This is a lot better then seaching for dump hard to find howtos. Thank you guys. I dont know what I would do without ya! :o) |
Grr! :scratch: There's got to be an answer to this! Something's just not right.
It's almost as though the name "root" were assigned to a regular user--but I don't think that's possible. As far as I know, it's a reserved word.... Oh, well. Please keep us informed if you find anything else out. Sorry there was no easy solution.... |
All times are GMT -5. The time now is 04:26 PM. |