LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 06-16-2010, 05:13 AM   #1
qs_tahmeed
Member
 
Registered: Nov 2003
Location: Bangladesh
Posts: 101

Rep: Reputation: 15
migrate /etc/shadow from Solaris 10 to other Unix/Linux OS Versions


Dear All,


I need to setup a server in Unix/Linux platform where i need to setup 300+ user accounts with no change in the user password from the primary server.

The primary server runs on Solaris 10.

Any idea how to migrate the /etc/shadow file. I have been googling for quite some time with 0 luck.

Thanks in advance
 
Old 06-16-2010, 06:22 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Just copy it over?

You'll need to copy passwd and group as well. And as always, make backups of these files.
 
Old 06-16-2010, 09:05 AM   #3
qs_tahmeed
Member
 
Registered: Nov 2003
Location: Bangladesh
Posts: 101

Original Poster
Rep: Reputation: 15
Thanks but Tried copying entries & it didn't work out!

Please let me know if I missed anything! It works fine if i copy from One Solaris system to another Solaris - OS version doesn't cause any problem.

I was actually trying to copy it from a Solaris system to a Redhat system and later on will try it on a FreeBSD system.

so far no luck!
 
Old 06-21-2010, 10:55 AM   #4
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

Rep: Reputation: 63
As you have found you can copy within environments, solaris to solaris and linux to linux, but not linux to solaris.

Each environment encrypts the password differently so you cannot just copy the password hash across. (The Linux hash is about twice the length of the solaris one). You will probably wind up requesting users set up their password on a linux server and a solaris then copying those as needed or setting them to a defined password.
 
Old 06-21-2010, 04:31 PM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Passwords are not really crypted on Unix systems but hashed, i.e. they cannot be decrypted.

The hashing algorithm can be configured on Solaris from the traditional crypt_unix one to one compatible with Linux by modifying the CRYPT_DEFAULT parameter in the policy.conf file. For an example, see:

http://docs.sun.com/app/docs/doc/816...%2Fpolicy.conf

Of course, modifying this setting will only affect new passwords so you'll need to wait for all your users to have renewed their password to have a compatible /etc/shadow file. This might be never depending on your expiration policy.

This file is also telling what algorithms will be accepted while processing password. I don't know if such a configuration file exist in the Linux distribution you use but that would be another way to solve your problem.

Usually, this kind of heterogeneous authentication issues are better handled by separating the user's operating systems from the authentication service, usually NIS or LDAP.
 
Old 07-20-2017, 07:38 AM   #6
VMKRVMR
LQ Newbie
 
Registered: Jul 2017
Posts: 4

Rep: Reputation: Disabled
can u help me as well i am also looking for same requirement
 
Old 07-20-2017, 08:31 AM   #7
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by VMKRVMR View Post
can u help me as well i am also looking for same requirement
Hi VMKRVMR and welcome to LQ.

Suggest you move forwards with the thread question you created here: http://www.linuxquestions.org/questi...ns-4175610257/ versus in a 7 year old question.
 
Old 07-20-2017, 05:03 PM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
The answer I provided seven years ago remains valid.

Solaris 10 default legacy /etc/shadow hash algorithm (crypt_unix) was not supported by Linux and still not is. In fact the generated hashes weren't even guaranteed to be compatible between Unix implementations.
 
Old 07-21-2017, 02:48 AM   #9
VMKRVMR
LQ Newbie
 
Registered: Jul 2017
Posts: 4

Rep: Reputation: Disabled
hi jillagre

then wat is the solution for my task of copying the users/groups from solaris to linux with same permissions
 
Old 07-21-2017, 12:11 PM   #10
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
This method won't work. A workaround might be to write a custom Linux PAM module able to understand Solaris crypt_unix.
 
Old 07-21-2017, 02:42 PM   #11
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 VMKRVMR View Post
hi jillagre

then wat is the solution for my task of copying the users/groups from solaris to linux with same permissions
Read the LQ rules about text speak and not using it. And the solution is for you to write a shell script as you were suggested in your other thread. We will help, but you actually have to show effort and write something.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Account name length in various versions of linux/unix? davidstvz Linux - Newbie 2 08-22-2008 12:44 PM
LXer: Unisys Tools Migrate WebLogic/Unix Stack to JBoss/Linux LXer Syndicated Linux News 0 06-14-2006 01:33 PM
migrate from shadow to vmail password freelinuxcpp Linux - Networking 0 10-03-2004 06:13 AM
how i migrate unix to linux or any appli to linux vandarakalpesh Linux - General 1 06-26-2004 05:52 AM
Migrate from older passwd/shadow to NIS JesteR Linux - General 0 11-28-2001 06:03 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 03:12 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