Find the answer to your Linux question:
Results 1 to 6 of 6
Hello, i've got problem, i'm trying to convert my users passwords stored actually on freebsd (master.passwd) into gentoo /etc/passwd /etc/shadow passwords. What can i do? Because normal copy and paste ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2006
    Location
    Poland
    Posts
    4

    Convert master.passwd into gentoo/linux style passwd


    Hello,
    i've got problem, i'm trying to convert my users passwords stored actually on freebsd (master.passwd) into gentoo /etc/passwd /etc/shadow passwords.
    What can i do? Because normal copy and paste strategy is not working...
    Any ideas? Please help

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2005
    Location
    Hell
    Posts
    514
    What's not working?

    Don't you just move /etc/passwd to /etc/passwd and /etc/master.passwd to /etc/shadow or something like that?

  3. #3
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,294
    Hi.

    Do both systems use the same encryption methods for passwords?

    If not, I doubt that copying will work. Instead of copying the entire file, you could try a test case with just one encrypted password for which you know the unencrypted string and see if you can login.

    Interesting question; keep us posted ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jul 2006
    Location
    Poland
    Posts
    4
    I've tried to copy only password string to the new added user on my linux system and it failed. Copying whole line from /etc/passwd and master.passwd fails - i can see the log:
    su(pam_unix)[2531]: check pass; user unknown
    su(pam_unix)[2531]: authentication failure; logname= uid=1000 euid=0 tty=pts/0 ruser=marcin rhost=
    su[2531]: pam_authenticate: Permission denied
    matrix su[2531]: FAILED su for romek by marcin

    where romek is user that password i know and marcin is my username.

    I think that maybe there is something with this PAM authorization??

  6. #5
    Just Joined!
    Join Date
    Jul 2006
    Location
    Poland
    Posts
    4
    Ok - i found the solution - i wrote perl script which did the job for me - the only thing i must do is to set this pass string from master.passwd and then add it to useradd command.
    f.e.
    Code:
    useradd -c 'Somebody' -m -p 'encoded_password_from_master_passwd'
    And it works - password works ok.
    Bye!

  7. #6
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,294
    Hi.

    I'm glad to hear it was resolved. I'm surprised that they used the same encryption, but that turned out to be good for you.

    I wonder why the copy / paste of the encrypted string didn't work? Perhaps I'll play with that ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •