Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Really appreciate your site. Really good site for learning what others do when they run into problems. You guy's are great!!!..."

Geography

Where in the world do Tek-Tips members come from?

Linux

How can I transfer SCO accounts (passwd information) to Linux?
Posted: 16 Dec 01

From http://pcunix.com/SCOFAQ/scotec1.html#ilinuxpass :
If the SCO passwd file has the encrypted password in its second field (in other words, the system isn't using /etc/shadow), then this simple script will work:

 IFS=":"
 cat scopasswdfile | while read line
 do
    set $line
   useradd -c $5 -p $2 -s /bin/bash -d /home/$1 -m $1
 done
 

This requires a current version of "useradd"; the older versions don't take encrypted passwords with -p

Normally, however, the encrypted passwords will be in /etc/shadow. This needs a little more work:

 sort scopasswd > /tmp/p1
 sort scoshadow > /tmp/p2
 join -t: /tmp/p1 /tmp/p2 > /tmp/pscopass
 IFS=":"
 cat /tmp/pscopass | while read line
 do
    set $line
    useradd -c $5 -p $8 -s /bin/bash -d /home/$1 -m $1
 done
 

Note that only the first 13 characters in the non-shadow passwd file are the encrypted password; the rest (stuff after the comma) is for password aging: see "man F passwd".

Back to SCO: SCO Unix FAQ Index
Back to SCO: SCO Unix Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close