Archived

This topic is now archived and is closed to further replies.

Evil Bill

Redhat 8: Computer Name + Samba question

Recommended Posts

How can i change the 'name' of my computer? By 'name' i mean the name that is displayed when you log in. I used to have it as "Server", but for some completely unknown reason it's now become "dhcp-92-6376" which doesn't look to great when you log on "Welcome to dhcp-92-6376". Edit: Just throught of somethign else: Is it possible to let all users (using Windows 98) access my server (running RedHat 8 and Samba) without specifying a password? Its just another nitpick really, but i don't like having to type the password when logging onto windows. [edited by - Evil Bill on January 20, 2003 12:26:56 PM]

Share this post


Link to post
Share on other sites
*Bump*
I've fixed the Samba problem ("guest ok = yes" & "guest only = yes"), but the name thign is still irritating me. I can change the hostname temporarily by doing "hostname Server" from a terminal, but the settings are lost when i restart.
Anyone know what file this setting is stored in?

Edit: I've cheated by adding the line "hostname Server" in the httpd (Apache) startup script and it seems to work, but this strikes me as a bit of a hack...

Thanks



[edited by - Evil Bill on January 22, 2003 12:17:43 PM]

Share this post


Link to post
Share on other sites
This is happening because eth0 (your primary NIC) is receiving information via DHCP, and reseting the hostname. If it's not too much trouble, probably the easiest fix is to reverse your cables so that what was eth1 is now eth0 and vice versa. If that's not a good solution, here's two things to try.

The first one is a curiosity point on my part. Edit your /etc/sysconfig/network-scripts/ifcfg-eth0 and add/edit a line:

HOSTNAME='host.domain.ext'

.. substituting your fully qualified hostname above. Reset your hostname manually (using hostname or any of the other methods). You may have to log out and back in to see the hostname change. Bring the interface down via ifdown and then back up via ifup.

If that doesn't work, I'm pretty sure this will. Edit the file /etc/sysconfig/network-scripts/network-functions. Find the function set_hostname() (it's on line 109 with Red Hat 7.3's config). Notice line 1 inside the function:

hostname $1

Try commenting that line out. Then, as like above, reset your hostname manually, logout and back in if necessary, then bring the interface down and back up. The reason this works (if it does) is that network-functions is included from the ifup-post script, called from ifup on success.

Good Luck and let me know if the first method worked unless you just swapped your eth0 and eth1.

EDIT: You may still have to override Apache and other programs. If I'm not mistaken, they do a reverse DNS lookup to determine your true hostname and use that.

[edited by - SilentReaper on January 22, 2003 12:26:59 PM]

Share this post


Link to post
Share on other sites
I tried that earlier. (Actually, i can''t rememeber if it worked or not) Apache gets set up first though, so it uses the wrong hostname and won''t work until i manually restart it.

HTTP404 x1 (huh!?)

Share this post


Link to post
Share on other sites