Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: Gordon Lee on August 30, 2001, 03:18:20 PM
-
hi all,
e-smith manager's "backup or restore" function takes a snapshot of all settings and data. can I just export user accounts and then later import into another e-smith?
thanks in advance!
gordon
-
User accounts are stored in /home/e-smith/accounts. You can capture just the user accounts (i-bay info and other stuff is also in the same file) to a file, copy that file to a new system and append it to the accounts file (making sure there are no duplicate key names!), then use the following command to create the users:
/sbin/e-smith/signal-event user-create username
where username is the name of one of the users in the file. You can write a loop to do this in a batch. Something like:
for USER in user1 user2 user3
do
/sbin/e-smith/signal-event user-create $USER
done
Or if you have lots and lots of users, write a script to parse the names out of the accounts file, then call user-create for each one.
Scott
-
hi Scott,
thanks for your response.
if i need to transfer all settings from an e-smith to another e-smith. can i just use that file and how?
best regards,
gordon
-
That depends on what you mean by "all settings". There is info in the accounts file (and the other files in /home/e-smith) that is machine specific, so you'd probably have to cull through the file(s) and extract just the portions you want. Then you need to examine the events (located in /etc/e-smith/events) to see which ones are like to apply (create-user, etc.) Or you might find the action itself (/etc/e-smith/events/actions) or you might try a post-upgrade event (/sbin/e-smith/signal-event post-upgrade.)
As you probably gather, there is no clean and simple answer to your question.
However, if you mean how do you transfer EVERYTHING from one system to another -- for example, to duplicate the entire e-smith system to another box -- then you need to look at the reinstallation boot disk and the backup options. The reinstall disk serves as the boot floppy for a new install, except that it will preset the essential options so your newly installed server can see its network. Once that is done, restoring a backup will do the rest. (One of the things on my wishlist is a "configuration only" backup -- on that restores system and network options, users, ibays, etc, but without restoring an content in the user/ibay directories.)
Scott
-
You may also have a look at this
http://netsourced.com/servers/docs/addusers-howto.html
jochen
-
Scott,
that thing you're wishing is what i'm looking for :-)
thanks for you help!
gordon
-
hi Jochen,
thanks for your suggestion!
gordon