If you have added Adaptive Server logins since the last database dump of master, or if no valid dump of master exists, restore the syslogins table.
How you restore the table depends on what information you have on hand:
If you saved the scripts with all sp_addlogin and sp_droplogin statements made in the correct order, run those scripts.
If you do not have the scripts, but have a copy of syslogins saved, reconstruct the sp_addlogin and sp_droplogin commands and the corresponding suids.
If neither the scripts nor the copy of syslogins is available, follow these steps:
Query all of the user databases to determine the name and the suid of each user. The sp_addlogin system procedure assigns an suid to each login in numerical order, and this suid is mapped to the sysusers table in each user database.
Once all names and suids are known, execute sp_addlogin for each user, in the appropriate order, so that newly generated logins have the same suid as the users in the user databases. You might have to enter dummy accounts for users whose logins have been dropped in order to keep current users' suid values in the correct sequence. Drop these dummy accounts when you are done.