Changing operating system name !

Posted on 2002-04-10
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.
Question by:norman2000
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2

Expert Comment

ID: 6930798
Look man uname
uname -a (all)
for operating system is
Example :
uname -rs
SunOS 5.7

Expert Comment

ID: 6930815
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.

Author Comment

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:
where XXX is the operating system name which we want to change .
and the YYY is hostname .
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 14

Expert Comment

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).

Expert Comment

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

1)  /etc/hosts

 ipaddress  sunbox

2)  /etc/nodename


3)  /etc/hostname.hme0


Accepted Solution

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).

LVL 14

Expert Comment

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.

Expert Comment

ID: 6970737
Sorry guys !! I totally misread the question1

Author Comment

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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap ( Version 1.2 2.      Jpcap( Version 0.6 Prerequisite: 1.      GCC …
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

734 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