How to restore a user's calendar agenda

How to restore a user's Calendar agenda
When you delete users from LDAP and then re-add them to a Calendar node, they
will be assigned new nscalxitemid's.
However, if you have not run any of the tools for removing these
"orphan" entries, the old
nscalxitemid's should
still exist in the Calendar database.
<P>
To restore a user's agenda from the Calendar database, use the following steps:
<P>
<OL>
<LI>Use ldapsearch to
locate the user entries for the user who you are trying to restore.
<P>
Depending on what version of Directory Server you have, the
ldapsearch command line
utility will be in one of the following locations:
<P>
(Directory Server 3.x): <I>
ServerRoot</I>/bin/slapd/server
<P>
(Directory Server 4.x): <I>
ServerRoot</I>/shared/bin
To search for the user with the UserID "bbunny," the syntax for
ldapsearch would be as follows:
<P>
ldapsearch -D "cn=directory manager" -w <I>password</I>
-b o=netscape.com uid=bbunny | more (All on one line)
<P>
It is also possible to dump the output of this command into a file, as in the
following example:
<P>
ldapsearch -D "cn=directory manager" -w <I>password</I>
-b o=netscape.com uid=bbunny > bbunny.txt (All on one line)
<P>
The LDAP entry for a Calendar user would appear something as follows (<B>Note:
</B> The Calendar attribute, nscalxitemid
is in <B>bold</B>, and the ID number
is in <B>red</B>):
<P>
dn: uid=bbunny,o=netscape.com
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
objectclass: nsLicenseUser
objectclass: mailRecipient
objectclass: nsCalUser
givenname: Bugs
sn: Bunny
cn: Bugs Bunny
uid: bbunny
nslicensedfor: mail
nslicensedfor: calendar
mail: [email protected]
mailhost: st-thomas.netscape.com
multilinedescription: I'm da wabbit!
maildeliveryoption: mailbox
<B>nscalxitemid: 10000:</B><B>00257</B>
nscalflags: 0
nscallanguageid: 0
nscalsysopcanwritepassword: 0
nscalpasswordrequired: 1
nscaldefaultnotereminder: 0:0
nscaldefaultreminder: 0:10
nscaldefaulttaskreminder: 0:0
nscaldisplayprefs: 4:480:1080:1:30:190:2
nscaloperatingprefs:
0:255:0:0:0:0:0:1440:0:1440:0:0:1440:0:1440:0:0:1440:0:14
40:0:0:1440:0:1440:0:0:1440:0:1440:0:0:1440:0:1440:0:0:1440:0:1440
nscalrefreshprefs: 1:60
nscalnotifmechanism: 1
nscaltimezone: 0
<P>
In the line <B>nscalxitemid: 10000:</B><B>00257</B>
, "<B>10000</B>" is the node number and
"<B>00257</B>" is the
calID number.
The number you will need to change is the
calID number,
"<B>00257</B>".
<P>
<LI>From the /unison/bin
directory for Calendar, run
unidsdiff
or ctxdirdiff (whichever
is available) to find the Calendar agenda that is missing an LDAP entry.
<P>
The syntax for these utilities will be as follows:
<P>
unidsdiff -n 10000
or
ctxdirdiff -n 10000
<P>
These utilities should list any entries that don't have a matching directory
entry, usually in the following format:
<P>
nscalxItemid="10000:<B>00256</B>" (S="Bunny",G="Bugs")
<P>
The ID number in <B>red</B> is the ID that you will
use to replace the ID number in the LDAP entry.
<P>
<LI>Use one of the following two options to update the LDAP entry:
<P>
<B>Option#1:</B>
<P>
<LI>Edit the file from the ldapsearch
output by changing the
nscalxitemid in this
file to the correct <B>ID</B> from the
unidsdiff/ctxdirdiff
output (from step 2 above).
<LI>Delete the user from LDAP.
<LI>Use ldapmodify to
re-add the user from the file you edited.
(ldapmodify is located
in the same directory as ldapsearch
<P>
For example,
<P>
ldapmodify -D "cn=directory manager" -w <I>password</I> -a -f <I>filename</I>
</UL>
<B>Option#2:</B>
<P>
<LI>Edit the file from the ldapsearch
output using update statements that
will update the LDAP entry without having to delete it.
<P>
For example, you can edit the output in step 1 above so that the file contains
only the following lines with the correct
nscalxitemid:
<P>
dn: uid=bbunny,o=netscape.com
changetype: modify
replace: nscalxitemid
nscaxitemid: 10000:00256
<P>
<LI>Use ldapmodify to
update the entry in the file, as follows:
<P>
ldapmodify -D "cn=directory manager" -w <I>password</I> -f <I>filename</I>
</UL>
</OL>
After performing the above steps, you can use
ldapsearch to locate
the entry and verify that it was changed. The user should now be
able to log into the Calendar Client and see her previous agenda entries.

How to restore a user's Calendar agenda
When you delete users from LDAP and then re-add them to a Calendar node, they
will be assigned new nscalxitemid's.
However, if you have not run any of the tools for removing these
"orphan" entries, the old
nscalxitemid's should
still exist in the Calendar database.
<P>
To restore a user's agenda from the Calendar database, use the following steps:
<P>
<OL>
<LI>Use ldapsearch to
locate the user entries for the user who you are trying to restore.
<P>
Depending on what version of Directory Server you have, the
ldapsearch command line
utility will be in one of the following locations:
<P>
(Directory Server 3.x): <I>
ServerRoot</I>/bin/slapd/server
<P>
(Directory Server 4.x): <I>
ServerRoot</I>/shared/bin
To search for the user with the UserID "bbunny," the syntax for
ldapsearch would be as follows:
<P>
ldapsearch -D "cn=directory manager" -w <I>password</I>
-b o=netscape.com uid=bbunny | more (All on one line)
<P>
It is also possible to dump the output of this command into a file, as in the
following example:
<P>
ldapsearch -D "cn=directory manager" -w <I>password</I>
-b o=netscape.com uid=bbunny > bbunny.txt (All on one line)
<P>
The LDAP entry for a Calendar user would appear something as follows (<B>Note:
</B> The Calendar attribute, nscalxitemid
is in <B>bold</B>, and the ID number
is in <B>red</B>):
<P>
dn: uid=bbunny,o=netscape.com
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
objectclass: nsLicenseUser
objectclass: mailRecipient
objectclass: nsCalUser
givenname: Bugs
sn: Bunny
cn: Bugs Bunny
uid: bbunny
nslicensedfor: mail
nslicensedfor: calendar
mail: [email protected]
mailhost: st-thomas.netscape.com
multilinedescription: I'm da wabbit!
maildeliveryoption: mailbox
<B>nscalxitemid: 10000:</B><B>00257</B>
nscalflags: 0
nscallanguageid: 0
nscalsysopcanwritepassword: 0
nscalpasswordrequired: 1
nscaldefaultnotereminder: 0:0
nscaldefaultreminder: 0:10
nscaldefaulttaskreminder: 0:0
nscaldisplayprefs: 4:480:1080:1:30:190:2
nscaloperatingprefs:
0:255:0:0:0:0:0:1440:0:1440:0:0:1440:0:1440:0:0:1440:0:14
40:0:0:1440:0:1440:0:0:1440:0:1440:0:0:1440:0:1440:0:0:1440:0:1440
nscalrefreshprefs: 1:60
nscalnotifmechanism: 1
nscaltimezone: 0
<P>
In the line <B>nscalxitemid: 10000:</B><B>00257</B>
, "<B>10000</B>" is the node number and
"<B>00257</B>" is the
calID number.
The number you will need to change is the
calID number,
"<B>00257</B>".
<P>
<LI>From the /unison/bin
directory for Calendar, run
unidsdiff
or ctxdirdiff (whichever
is available) to find the Calendar agenda that is missing an LDAP entry.
<P>
The syntax for these utilities will be as follows:
<P>
unidsdiff -n 10000
or
ctxdirdiff -n 10000
<P>
These utilities should list any entries that don't have a matching directory
entry, usually in the following format:
<P>
nscalxItemid="10000:<B>00256</B>" (S="Bunny",G="Bugs")
<P>
The ID number in <B>red</B> is the ID that you will
use to replace the ID number in the LDAP entry.
<P>
<LI>Use one of the following two options to update the LDAP entry:
<P>
<B>Option#1:</B>
<P>
<LI>Edit the file from the ldapsearch
output by changing the
nscalxitemid in this
file to the correct <B>ID</B> from the
unidsdiff/ctxdirdiff
output (from step 2 above).
<LI>Delete the user from LDAP.
<LI>Use ldapmodify to
re-add the user from the file you edited.
(ldapmodify is located
in the same directory as ldapsearch
<P>
For example,
<P>
ldapmodify -D "cn=directory manager" -w <I>password</I> -a -f <I>filename</I>
</UL>
<B>Option#2:</B>
<P>
<LI>Edit the file from the ldapsearch
output using update statements that
will update the LDAP entry without having to delete it.
<P>
For example, you can edit the output in step 1 above so that the file contains
only the following lines with the correct
nscalxitemid:
<P>
dn: uid=bbunny,o=netscape.com
changetype: modify
replace: nscalxitemid
nscaxitemid: 10000:00256
<P>
<LI>Use ldapmodify to
update the entry in the file, as follows:
<P>
ldapmodify -D "cn=directory manager" -w <I>password</I> -f <I>filename</I>
</UL>
</OL>
After performing the above steps, you can use
ldapsearch to locate
the entry and verify that it was changed. The user should now be
able to log into the Calendar Client and see her previous agenda entries.

Similar Messages

  • How to restore ANONYMOUS user

    Hello
    I have dropped  user ANONYMOUS long before. Now trying to setup Apex 4.2. I don’t have backup. Could any one tell me how to restore  ANONYMOUS?
    My database version is 11g .
    Thanks

    Hi Suman,
    That's a good question.  ANONYMOUS is used for many thing besides Oracle Application Express.
    Your best bet is to contact Oracle Support and see if there is an official recommendation how to restore this.
    I hope this helps.
    Joel

  • How to export a user's Calendar Appointments in Powershell from Exchange Server

    Exchange 2010 sp3 w/hybrid Configuration:  Current User is On-Premise
    1. Is it possible to retrieve all calendar appointments for a particular user from the on-premise exchange servers using powershell?
    2. If item 1 is possible, can we track a user appointment - meaning that if someone where to delete the appointment the report can show us who deleted the appointment by using powershell to generate this report?
    Thanks,

    Hi,
    Base on my knowledge, I don't think it is possible.
    However, as a workaround, you can use powershell to recover all deleted items in a particular user:
    PowerShell: Script to recover all deleted items in a mailbox
    In addition, I recommend you post this in Powershell Forum
    also, as they should have more professional knowledge on scripting and you may get effective solution timely.
    Thanks.
    Niko Cheng
    TechNet Community Support

  • How to restore single user/comp accidently deleted from AD,without starting in DSRM mode.???

    I found only solution for this, restore syatemstate backup and then using ntdsutil:restore user.
    Is there any other way,keeping server offline it costs to company.

    Hi Hemant,
                    Yes,u can probably stop the AD service from command line by typing- "net stop ntds" and then you can do authoritative restore of object using ntdsutil. After restoration you can start
    the service again- "net start ntds". But restarting the server will ensure proper restoration of that object.
    Thanks
    Tousif

  • How to restore a user home account to a new hard drive

    I had a hard drive go out and before it did, I have a copy of my user directory on a firewire drive. I got a new hd and am ready to move the back up over to the new drive.
    Is there any steps I should follow to do such? Will a simple copy of the total user account over to the new drive work ok if I create the exact name of the backup home directory to the new drive and say "replace"? I want to make sure my mail, docs and music directories are correct. I have the apps backed up but can reinstall them if need be and not to mes with the libraries.
    Thanks
    jf

    Boot the machine with your install disk, select your language, and, when the menu bar pops up, select Utilities/Disk Utility, select the new HD, select erase and format/partition (as desired) Mac OS Extended and install OS 9 drivers if the machine supports OS 9 booting (not shown in your configuration information), under security options select zero out data. Once the drive is formatted, install Tiger. After the machine restarts, go through the welcome dialogs and use the same name, shortname, and password you used originally. After that finishes, simply mount the FWHD and you should be able to just drag and drop everything from the backed up users folder to the new one. Don't drag the users folder, just the subfolders.
    Once you've successfully restored everything, then use something like Carbon Copy Cloner, SuperDuper!, etc. to make a bootable backup onto the FWHD. That way, you can always reverse the procedure whenever the HD goes south again.

  • How to restore a user account

    My user account seems to be corrupted. It does not allow me to back up files in Quickbooks. Also, my internal speakers do not work. In order to hear anything, I need to connect headphones or external speakers to my laptop.

    If it's only QuickBooks that crashes, it may be something only Intuit can fix. Does it crash with a crash report? Find crash reports by launching Console - it's in your Mac's Utilities folder. Click Show Log List if it is not already shown. Crash reports may be found under Diagnostic and Usage Information. Click the "reveal triangle" to the left of User Diagnostic Reports. Crash reports end in the suffix .crash.
    Find the most recent one that appears to be related to QuickBooks. Copy and paste the entire crash report in a reply. Obscure or omit any information that you may consider personal.

  • How to restore old prefs, etc after clean reinstall of 10.3.9?

    Due to a fiasco with Drive Genius I was forced to reformat and reinstall 10.3.9. Luckly, I was bright enough to manually copy over the entire contents of the drive to a firewire drive before I started the drive genius project.
    I was able to find directions on how to restore my users which worked perfectly.
    I've copied all the apps back. But all the apps were in the main drive rather than in users, so the prefs, registrations etc are, I assume, stored in the old library.
    Is there a way to replace the new library with the original to avoid several days work digging out the original packaging to get the serial numbers for re-entering so I can get back to work right away?

    The serial #s, etc were in fact in the original main library. I was able to restore the use of all the programs by manually replacing the missing items in each folder in the library. It took over an hour, but I got it all back and saved me from having to rummage through storage boxes for the original documentation to retrieve and re-enter all the info.

  • How to restore just one calendar user

    Hi,
    I use UNIDBRESTORE to restore the node and configuration information of my calendar.
    But does anybody know how to restore just one or more
    calendar users?
    Thanks,
    Fred

    funny, but I found the solution... I Have to use UNIRESTORE.
    Fred

  • How do I locate an iCal calendar from a backup and restore?

    I need help in restoring a calendar that I deleted. I haven't used Time Machine since May, but I do use SuperDuper and have a clone of my hard drive backed up through yesterday. I am pretty sure the file is there somewhere, I just don't know where or how to get it back into iCal.
    Here is what happened...
    *I use Mobile Me to sync my iMac (primary), MacBook and iPhone.*
    A week ago I was trying to get my "Sports" calendar subscribed to my daughters old iMac. After reading the forums, the suggestions were to rename the calendar and try again, which I did. Changed it to "Kids Sports" and it seemed to allow her to subscribe, although updates/additions/deletions never made it to her computer. I left it alone at that point, knowing it still wasn't working properly but she had the brunt of her schedule.
    Then sometime in the last few days I downloaded a schedule for my child's soccer tournament using my MacBook. It placed 3 games (with all the times, locations, etc) onto my MacBook, I thought wow, how cool, I didn't have to type all the info myself. I have never downloaded a calendar file before.
    I noticed a little while later that those 3 games did not sync to my phone or iMac. I investigated and thought the time zone may have been the culprit, I can't remember what was listed but it wasn't a time zone, it was something like "undetermined" or along those lines (can't see it now because the calendar is gone), so I changed each of those 3 events to Central Time manually. Later they show up as 5 hours earlier than Central Time.
    Yesterday I open up iCal in the MacBook and it's showing my "Personal" calendar with thousands of duplicate entries that are selected to "never" end, going back to around the year 2000. I have no idea how my "personal" calendar got this way, I haven't changed anything with it. Since I've been working on the "sports" calendar mess. I deleted the events in the "personal" calendar from October 1st going forward, of course everything prior to that is still there. About 4 events listed for everyday and to never end.
    I also get a message that I have over 2200 entries that need to be reviewed in iCal before syncing last night. It's the calendar labeled "kids sports". I can see that in iCal I now have 2 sports calendars, "sports" and "kids sports", they both seem to have the same information in them, so I sync with the "kids sports" calendar to be deleted. WRONG answer! All that is left are the 3 events from the calendar I downloaded online, in the calendar labeled "sports".
    Everything is already deleted from MobileMe as well.
    Soooo, is it possible to pull the "kids sports" file from somewhere in the applications area and put it back where it belongs from my back up?
    It seems like once a year I have a major issue with MobileMe duplicating, but I have yet to understand what I am doing wrong!
    Thanks,
    Sandy

    Anyone?
    Let us get home from work first
    I see my daughter's old iMac still has the "kids sports" calendar showing up with all the info still showing on her iCal, but she is subscribed to that calender versus syncing with it. I'm not sure if she has it set to manually refresh or automatically refresh.
    If the calendar shows up fine on her computer the easiest way to get it cleanly is to get it from her computer if that is your goal. I'm assuming this is a calendar you created on your computer and then published and then she subscribed to it?
    _Go to her computer.
    _Click on the calendar in question on the left hand side once.
    _Go to File > Export > Export and save to the desktop.
    _Bring the resulting .ics file to your computer.
    _Delete the current kids sports calendar from your computer.
    _Double-click the .ics file your brought over and add it to a "New Calendar"
    _Now you can re-publish that calendar.
    I don't understand why I can't use Superduper! to find the deleted calendar (deleted today and sync'd)
    I'm afraid I've never used Superduper! so I can't offer any suggestion there. You may want to ask the maker of that software how to restore from their backups. I use Time Machine. However if SuperDuper! clones your hard drive as you say then all your calendars are stored in Your User > Library > Calendars on that backup.
    You don't restore individual Calendars with iCal because it is one large database (in truth you can but it is very time consuming as every single event has it's own individual .ics file). So when you want your calendar from a certain restore point in time (when you made the last backup) you can follow these steps:
    _Quit iCal completely
    _Go to Macintosh HD > Applications > iSync
    _Open iSync
    _Go to iSync > Preferences and remove the check mark for "Enable syncing on this computer"
    _Reset Sync Services: http://support.apple.com/kb/TS1627
    _Remove Your User > Library > Calendars to the Trash
    _Copy the Calendars folder from your backup and put it in Your User > Library where the old one used to be
    _Launch iCal and check for your calendars
    _If the calendars show up ok go back to iSync and re-check the box for "Enable syncing on this computer"
    Hope that helps.

  • How to restore views and procedures after drop user command?

    How to restore views and procedures after drop user command?
    We have 817 EE on NT and one developer created a lot of procedures, functions and vews. DB was not backuped and archived and export has not been done - our fault and we understand it. Sorry for this.
    Ok, now the story: another developer dropped this db user and we lost everything: procedures, functions and vews. The new user with trhe same name was created and new schema was imported in this user, but all old objects are lost. We don't have export and backup and archive log files.
    Question: may we can restore this lost stuff from some other sources. We are looking for lost codes, not data. May be we can use redo logs or shared pool or any other things. Any idea will be appreciated.
    Thanks.
    Victor
    [email protected]

    The switch has occurred after user was dropped, the data has been overwritten and there is be no way to use redo log files.
    I would like to explore another opportunity. Is possible to use Shared Pool or any Data Dictionary internal information to restore texts of the lost SQL and PL/SQL scripts executed in this DB before user was dropped? Not too many scripts are executed in this DB and the lost ones may still be in stack. I remember that Shared Pool (cash) should keep last executed scripts in order to improve performance. They probably are kept in some special format. Can we restore these scripts? Of course they also might be pushed out by Import that had been done after user was dropped.
    Thanks for your help,
    Victor

  • How to recover backup user data after a restore

    I had a disk fail and could not boot. while in the restore software I was able to backup user data to a USB drive. Now that I've restored from the restore partition and got it running windows 7 home again, I don;t see how to recover the user data made with the low level software. Windows back up doesn't seem to recognise it and I can't find an HP utility to get at it.
    A program saved with the .wim back up files brought up an HP restore manager application that then copied the filed to my new C drive but how do I actually get it to recover them into their appropriate places and recreate users etc.
    Or, should I just consider myself lucky to still have copies of the files at all?  I'll not be real happy about that because it will be a tom of work to recreate everything manually even with the files.
    I'm hoping someone out there has a better solution for recovering all my user data into my new restored initial image.
    thanks,
    -dcb

    Hello dcbrower, You may be able to use the program Universal Extractor to extract the files in the .wim file.
    This is a Free program that can be found at this  Link. .
    Just extract the files in the wim file to a location you would like.
    Please click the White Kudos star on the left, to say thanks.
    Please mark Accept As Solution if it solves your problem.

  • ICal launches, but no calendars (day, week or month) will open. All menus in the top bar seem normal, but none of them create any action. I cannot find any troubleshooting or instructional articles explaining how to restore or reload iCal. Anyone had this

    iCal launches, but no calendars (day, week or month) will open. All menus in the top bar seem normal, but none of them create any action. I cannot find any troubleshooting or instructional articles explaining how to restore or reload iCal. Anyone had this happen? Is there a fix?

    I tried using Time Machine to restore iCal, tried doing disk repairs... nothing changes the outcome. No windows will open in the application.

  • TS3714 How can i restore or retrieve my calendar inputs that disappeared when i tried to sync it to my internet accounts?? I didnt find it on my yahoo and gmail accounts on thw web. Pls help me

    How can i restore or retrieve my calendar inputs that disappeared when i tried to sync it to my internet accounts?? I didnt find it on my yahoo and gmail accounts on thw web. Pls help me

    You don’t need to do that. Click here and follow the instructions, or if they don't cover the type of adware on the computer, these ones. If you're willing to download software to resolve this issue(you don't need to, but may find it easier), you can instead run Adware Medic; this link is a direct download.
    (117389)

  • Restoring Deleted User Calendars 10.6.8

    We manage several public event calendars in OS X Server 10.6.8 via a single user called "Calendars" that publishes all its public calendars to the server. To facilitate ease of management in users' iCal, I also created a second user - called "Almanac", to whom I have delegated "read only" access to these calendars via iCal's delegation tab in the "Calendars" account. Thus, most users view the calendars by authenticating iCal using the "Almanac" account, while two or three privledged calendar managers view and edit that same data by authenticaing using the "Calendars" account.
    This worked flawlessly for years, until recently when for no apparent reason, the "Calendars" account was getting automatically disabled on the Server, causing authentication errors in users' ical and of course presenting event updates. At first I thought the fault lay in my OD policies, which are set to delete accounts after 90 days of inactivity. However, this particular account has been excepted from this policy in Workgroup Manager via the Avanced Tab/Options.
    In the past, I've cleared up similar niggling problems by simply deleting and recreating the problematic user account, making sure to use the same short name and then running chown -r on the appropriate user home folder.  I did that with this account, and indeed it is no longer being disabled. However, all of the precious iCal calendar events have disappeared. I can see the calendars themselves when I log into the Calendars user account and start up iCal, but there are no events present. When I try to access the calendars on the server via a privledged or unprivledged user in iCal, I get the message:
    "The calendar http://<my.server.FQDN>:8008/principals/__uids__/00C48532-BA77-478C-A4D3-17A848DD9F6D/ was not found on the server. Make sure the URL is correct."
    Looking at the Calendar user home folder, it looks like the data is all still there in ~/Library/Calendars. On the server, I also see what appears to be the Calendar Server documents that match the above UID in /Library/CalendarServer/Documents/Calendars/_uids_/...  Of course, I also have multiple backup copies of all of these directories via TimeMachine, SuperDuper! and PresSTORE.
    I've already tried rm all the user calendar cache files and resyncing, also tried trashing all the user iCal preferences. Also tried a full restore of the users home folder via TimeMachine and running chown -r again.
    Thoughts anyone? Thanks.

    Sorry - I meant chown -R of course.

  • How to restore Calendars using Time Machine

    Hi there,
    After reading several postings (especially https://discussions.apple.com/message/16446185#16446185) I thought to understand how to restore my Calendars from Time Machine after creating a big mess using iCloud...
    So far so good:
    1. Open Finder and select Go > Library - using the Alt key- (so the folder "Calendars" is shown)
    2. Enter Time Machine
    3. Go to the date from which to restore
    But:
    4. Then the Destination Window opens
    So I try to find my way to, you might guess, Home > Library... can't be seen. It's hidden. And now the Go > (press Alt = ) Library is grayed out.
    So, how to make this work?

    Pondini provided what looks like it might work:
    Re: Restoring Backed up iCal folder to desktop: copy permission error 
    Mar 24, 2012 4:09 PM (in response to PeterSnyder)
    I've not tried it with Calendar files, but you might want to try the workaround in #E10 ofTime Machine - Troubleshooting.

Maybe you are looking for