Solved

Changing operating system name !

Posted on 2002-04-10
9
244 Views
Last Modified: 2013-12-27
I am using a solaris 8 computer,I did the command sys-unconfig and I changed the configurations,a fter that I tried to unisntall an appliction,but I received a meesage telling me that it is unsupported operating system and it mentioned the name of the operating system wrongly.
My quesiton is :is there a coomand to rename the operating system correctly?
yes I mean that ,although it seems stupid and hopeless.
thanks
0
Comment
Question by:norman2000
  • 2
  • 2
  • 2
  • +2
9 Comments
 
LVL 4

Expert Comment

by:Otetelisanu
ID: 6930798
Look man uname
uname -a (all)
for operating system is
Example :
uname -rs
SunOS 5.7
0
 
LVL 4

Expert Comment

by:Otetelisanu
ID: 6930815
Look
uname -S

-S system_name

The nodename may be changed by specifying a system
name  argument.  The  system name argument is res-
tricted to SYS_NMLN  characters.  SYS_NMLN  is  an
implementation    specific    value   defined   in
<sys/utsname.h>. Only the  super-user  is  allowed
this capability.
0
 

Author Comment

by:norman2000
ID: 6930998
When Iam trying to change it using the command as folowing:
uname -S sunOS
just  the hostname (nodename)is changed ,& it did not change the operating system name.
and when  displaying it by the command
uname -sn
it returns:
 XXX   YYY
where XXX is the operating system name which we want to change .
and the YYY is hostname .
 
0
ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 
LVL 14

Expert Comment

by:chris_calabrese
ID: 6931088
Uname -s changes the hostname of the current computer, not the operating system name.  There is no way to change the operating system name short of editing the kernel image or some such.

Instead, you need to figure out exactly how the uninstall program is determining the OS name and then cheat.

If it's a shell script then you can simply change the script.

If it's a binary that's calling the uname command line program , then you can probably put a fake copy of uname in a directory that you place at the beginning of the PATH before calling the uninstall script.

If it's a binary that's calling the uname() library call, you may be able to edit the binary with a binary editor or link in an alternate version of the uname() library call (by using LD_LIBRARY_PATH).
0
 

Expert Comment

by:masterT
ID: 6960045
why don't you just change the files


1)  /etc/hosts

 ipaddress  sunbox  sunbox.domain.com

2)  /etc/nodename

    sunbox

3)  /etc/hostname.hme0

   sunbox
0
 
LVL 4

Accepted Solution

by:
boxcar7 earned 200 total points
ID: 6970721
I believe the command you want is setuname.  
For example, at a command line, type:
setuname -s MyOS

That will change the OS name to MyOS (from SunOS).
You might want to try just changing the running kernel (ratherher than making a permanent change) by adding the -t parameter to make sure it doesn't break any of your applications that actually make use of the OS name
(i.e. setuname -t -s MyOS).

0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 6970733
Hmm, didn't know about that one.  Just looked at the man pages and looks like it would work, though.  Suggest giving points to boxcar7.
0
 

Expert Comment

by:masterT
ID: 6970737
Sorry guys !! I totally misread the question1
0
 

Author Comment

by:norman2000
ID: 6974648
I used this command and it worked!
but I have another  problem in the Appache server,I will try to solve it,if i could not i will post it
thanks
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question