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
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
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.
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
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.
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.
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.
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.....
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
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
There are currently 1 users browsing this thread. (0 members and 1 guests)