Results 1 to 9 of 9

Thread: *nix - export users

  1. #1
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts

    *nix - export users

    I've had a look around and am nearing the conclusion that it isn't possible, but can you export all user accounts and unencrypted passwords to a file?

    Cheers

  2. #2
    Commander Keen
    Join Date
    Nov 2003
    Location
    217.27.240.214
    Posts
    624
    Thanks
    0
    Thanked
    0 times in 0 posts
    sounds like a haxing question

    AS for exporting. sounds like a migration of somesort. I have no clue. but you can get the list of users accounts and passwords from the shadow passwd file.

    /etc/shadow

    You have to be root to get near it. OR you have to put a bootable disk and then edit this file. There the passwords are encypted, by simply deleting the encrypted parts for each account you reset everyones password to "" <- NOTHING. then you can set new passwords later with passwd.

  3. #3
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts
    ta mr,

    yeah we are in the process of migrating to a new system. I have most of the usernames and passwords in an excel sheet, so I'll just use that and hope all of the other usernames that appear to be on our current system are redundant

  4. #4
    Commander Keen
    Join Date
    Nov 2003
    Location
    217.27.240.214
    Posts
    624
    Thanks
    0
    Thanked
    0 times in 0 posts
    there MUST be a way to do this. If there isn't, I am off to write a tool that parses the shadow file and ADDS the users. This is actually a fairly simple script problem...

    *i am not actually going to write this, but for illustration purposes this is all - in theory - it needs to do*

    copy the old shadow file.

    get the list of usernames.
    automatically go through the list creating a new account for each username with a default password. can't remember the command it is something like "adduser".
    THEN copy the new systems shodow file. getting each users default password entry to be replaced by the old shadow files encrypted entry. Save the altered new shadow file and bingo... obviously there sould be a copy of the temporary shadow for the new system taken before the tricky encryption replacement.

    ACTUALLY. IF THE GENERATED SHADOW FILE - FROM THE ADD USER PHASE - LOOKS LIKE THE OLD COPIED ONE, IN EVERY RESPECT APART FROM THE PASSWORD SECTION FOR EACH USER. SIMPLY SWAP THE OLD ONE FOR THE NEW ONE.

    I am rambling. but this is not that hard to do. somebody somewhere HAS written a tool I am sure.

  5. #5
    Senior Member SilentDeath's Avatar
    Join Date
    Aug 2003
    Posts
    4,745
    Thanks
    38
    Thanked
    16 times in 11 posts
    there are tools to brute-force the passwords, I had to use one once when I forgot my root password...

    I think it was directhex that told me how to do it, either that or it was a loooong time ago before dalnet irc got b0rked.
    Last edited by SilentDeath; 28-07-2004 at 04:48 PM.

  6. #6
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts
    ta SD, a bit excessive though

    Well I have a list of all the users from the current system, I know which ones we have passwords for. Using the 'last' command I'm finding out which other ones appear to be used still.

  7. #7
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    68 times in 51 posts
    if you are just migrating users/groups to a new system why not simpley cut and paste the entries from /etc/passwd /etc/shadow into the new /etc/passwd /etc/shadow files ? or append them onto the bottom of an existing one if there is already uses there (ignore the root/adm/lp/spool/uucp etc accounts)

    If you want a long winded way of doing this, setup NIS (better still NIS+), make your server a nis master, then do a nis passwd.byname backup make your new server another nis master or a nis slave and import the passwd.byname backup, then turn off the nis config, and hey presto user accounts migrated.

    Its a long way of doing things...but hey you did ask
    It is Inevitable.....


  8. #8
    Commander Keen
    Join Date
    Nov 2003
    Location
    217.27.240.214
    Posts
    624
    Thanks
    0
    Thanked
    0 times in 0 posts
    on another note. is my last suggestion totally insane ?

    I mean. if u adduser all the usernames. u have their accounts setup as normal. then putting the old shadow file on the new system should set the same passwords as before.

    I am not too good at unix systems. I have gentoo. but If I could figure out how to run my tv card AverMedia dvb-t <- REAL probs with this last I checked -> then i would delete this windows and figure everything out. obviously have a small partition for windows game-er-y.

    What can i say. I like TV and its the only tv in my flat

  9. #9
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts
    mornin'

    I'll give that shadow/passwd thing a try kill/ikonia

    I always kinda assumed the passwords would go much deeper than that, but if it works I ain't complaining

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Opera users might want to upgrade
    By Paul Adams in forum Software
    Replies: 3
    Last Post: 07-06-2004, 05:30 PM
  2. WinXP restriced users options????
    By Kumagoro in forum Software
    Replies: 6
    Last Post: 29-04-2004, 10:15 PM
  3. Thanks Hexus users
    By Jimmy Little in forum General Discussion
    Replies: 12
    Last Post: 21-04-2004, 11:01 PM

Posting Permissions

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