LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-17-2012, 02:55 AM   #1
ajayyadavmca
LQ Newbie
 
Registered: Dec 2006
Posts: 28

Rep: Reputation: 0
depersonalizing Linux


Hi, Is there a documented and predifined process for depersonalizing linux OS image?

we create image of our product which also includes OS and ship so before shipping we need to depersonalize this OS image, like removing macaddress, ssh keys, HOSTNAME etc..
this is what i know of may be more attributes to remove.

was searching on google and couldnt find much help full. please let me know any reference or way.. thanks

Used Linux OS: CentOS 6.2

Thanks
 
Old 07-17-2012, 09:14 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by ajayyadavmca View Post
Hi, Is there a documented and predifined process for depersonalizing linux OS image?
we create image of our product which also includes OS and ship so before shipping we need to depersonalize this OS image, like removing macaddress, ssh keys, HOSTNAME etc.. this is what i know of may be more attributes to remove.

was searching on google and couldnt find much help full. please let me know any reference or way.. thanks
Used Linux OS: CentOS 6.2
Thanks
No, and you won't find any documented process on this. Mainly because there's no way for ANYONE to define it. Whatever services you have on your system/image may be completely different than what anyone else has. You can put the configurations ANYWHERE, make symbolic links, etc., which will make the system unlike any other. That's up to you.

So, since you've built the custom image, you know where everything is, and what the 'etc' is that you're talking about. Only you can edit/change/document what's needed.
 
Old 07-17-2012, 10:57 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I agree. You won't find any documented process. However if you would have started the build process with some forethought you could have made a baseline (disk image or 'md5deep -r /' or used versioning) and roll back unnecessary changes. All that's left now is package verification, as in 'rpm -Vva', visual inspection of any changes plus those files not part of any package. Depending on how your product is isolated within the OS or not it may in the end be easier / more efficient / quicker to start over...
 
Old 07-17-2012, 11:59 AM   #4
ajayyadavmca
LQ Newbie
 
Registered: Dec 2006
Posts: 28

Original Poster
Rep: Reputation: 0
make sense

yes make sense, let me define my requirement more clear then,

i just want to remove hostname, IP Address, gateway, dns, netmask, hw mac adress, ssh keys rest is my application specific that i will take care of. so is there a neater way to do this or i can simply remove these entries from various files in /etc ?
 
Old 07-17-2012, 12:03 PM   #5
fazorboy
LQ Newbie
 
Registered: Jul 2012
Posts: 11

Rep: Reputation: Disabled
may be

i have similar requirement, if you get your solution please let us know.
 
Old 07-17-2012, 03:31 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by ajayyadavmca View Post
yes make sense, let me define my requirement more clear then,

i just want to remove hostname, IP Address, gateway, dns, netmask, hw mac adress, ssh keys rest is my application specific that i will take care of. so is there a neater way to do this or i can simply remove these entries from various files in /etc ?
You were clear to start with...so was the answer. No, there isn't a better way to do it, other than editing those files manually. But since you only have to do it ONCE, it shouldn't be a huge task. All you're talking about is removing a few files, and editing a few others.
 
Old 07-17-2012, 03:34 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by ajayyadavmca View Post
let me define my requirement more clear then
There is no need to do that. I think we all perfectly understand what you need to do.


Quote:
Originally Posted by ajayyadavmca View Post
so is there a neater way to do this or i can simply remove these entries from various files in /etc ?
I already suggested you how to start cleaning up. I also suggested a way that I consider neat, however your definition of "a neater way" may be different. You've seen two opinions now and the clear hint there isn't any formal process so better not push further but just do it.

Last edited by unSpawn; 07-17-2012 at 06:28 PM. Reason: //Typo
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration