migrate /etc/shadow from Solaris 10 to other Unix/Linux OS Versions
Solaris / OpenSolarisThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
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:
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.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.