1748131 Members
3638 Online
108758 Solutions
New Discussion

Re: temp hostname change

 
Go to solution
rleon
Regular Advisor

temp hostname change

We have an app team that insist that they need to change a hostname to install their app.

 

Its just as simple as running the hostname command no neeed to edit /etc/password  , /etc/rc.config.d/netconf ..

 

Needless to say their change occur in the middle of the night ... and then once they are done we are to change the hostname back.

 

We tried to change the varible HOSTNAME but when the hostname command is ran it still shows the old hostname.


My question is .. is there a varible to change the hostname?

Or would we have to give them sudo access to change the hostname back and fourth.

 

 

7 REPLIES 7
donna hofmeister
Trusted Contributor

Re: temp hostname change

why not just modify dns and/or /etc/hosts to add an additional name?

Torsten.
Acclaimed Contributor

Re: temp hostname change

Try

 

# hostname

 

# hostname mynewhostname

 

# hostname


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Horia Chirculescu
Honored Contributor

Re: temp hostname change

Giving sudo access to change the hostname of any unix machine is a security risk.

 

Some of your services could depend on that name. I wonder if the app team must install a new app every night becouse if they only have to do that let's say once per month you should assist them to do that. Better talk with them and try to understand why they have this requirement from you. Maybe there is one missunderstanding of the problem.

 

 

Best regards from Romania,
Horia.
Doug O'Leary
Honored Contributor

Re: temp hostname change

Hey;

 

>.# hostname mynewhostname

 

You should also use "uname -S ${newhostname}"  although, like the others, I find this quite squirrelly.  There's something not right going on there if they need to change the hostname in order to install an app...

 

HTH;

 

Doug O'Leary


------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Pallavi P
Occasional Visitor

Re: temp hostname change

you can use "set_parms hostname" command to change hostname .

 

Hiren N Dave
Valued Contributor

Re: temp hostname change

> you can use "set_parms hostname" command to change hostname .

 

It will change hostname on permanent basis...

I am an HP Employee

Was this post useful? - You may click the KUDOS! star to say thank you.
Dennis Handly
Acclaimed Contributor
Solution

Re: temp hostname change

>It will change hostname on permanent basis.

 

Yes but you can "permanently" change it back.  :-)