Retrieve Logon user from Windows Directory
Hi,
We need to retrieve logon user from windows directory in BSP. Please suggest the relevant code for the same.
Regards,
Divyanshu
Hi,
I have a scenario where in we have a enhancement to open a PDF file in portal with standard SAP HCM_LEARNING application. If file does not exist then I need to give the custom messages.To give the custom message we need to check that whether the URL of PDF file is valid or not. Currently I am using HTTP2_GET function module to validate the same.This FM returns the status code by which we can know whether this URL is accessible or not. This function module requires a RFC destination as a input parameter . I am using SAPHTTPA for the same.
This RFC Destination (TCP/IP) does not have credentials with it , so the return status code is always 401 (unauthorised ). I also tried to use other RFC destinations(of type G) that have credentials with it but this is not compatible with this FM.
Can you help me in regard to below queries:
Is there any other method that we can use to validate the URL ?
How we can use the session variables (as the user has already logged in so that it should not ask for credentials.) Is there any way to specify the Credentials in the RFC destination of type T?
Kindly share your inputs with me to fix the same.
Similar Messages
-
Exporting Users From Iplanet Directory
How do you export users from Iplanet Directory Server so that they can be imported into a MS Active Directory either 2000 or 2003?
Any help would be appreciated with step by step instructions.
Jippy35Thanks Andbrowny
I gave it a go, but got a strange error, does this mean anything to you?
admin$ sudo ldapsearch -LLL -H ldap://127.0.0.1 -b "cn=users,dc=my,dc=domain,dc=net" > userexport.ldif
Password:
SASL/GSSAPI authentication started
ldapsasl_interactive_binds: Local error (-2)
additional info: SASL(-1): generic failure: GSSAPI Error: Unspecified GSS failure. Minor code may provide more information (No credentials cache found)
I suspect my OD is screwed, as slapd maxes out all 8 cores every few days, and takes out the mail server as a side effect.
The Linux link wasn't applicable to this, all the commands and paths are different to MacOS X unfortunately. -
Migrating Users from domino directory
hi
We are planning to migrate users from domino directory to the sun java directory server. Is it possible to import the csv file of domino into sun directory.
The imported users should be visible in the corporate address book.
Would like to know the file in which the directory server saves the users..
we are using directory server v 6.0
thanks..you will need to crunch your csv and convert it to LDIF
-
How to find logged in user from Windows Registry?
Hi,
am developing a windows store 8.1 app using C# and xaml.
In my app i want to find logged in user name from Windows Registry.
How can i get that from C# code?
Anybody please help me.
Regards,
Santhoshfrom aa store app you don't have access to the windows registry.
Microsoft Certified Solutions Developer - Windows Store Apps Using C# -
I'm having a problem playing some ItunesU videos, some play okay, some just show black screen and don't play, others show a still image but then doesn't play when trying to view them from itunes store. The audio files play with no issues.
I am using windows 7.
However, if I download the videos that don't play to the laptop's drive and run them from the windows directory they play okay. I don't want to have to download videos to see if they are something I'd like to watch.
Just for reference, an example of a video that plays okay is by UC Berkeley Math 16A 001, Fall 2011. Another is Introduction to Robotics by MIT.
An example that just shows blank screen is Stanford's Iphone & Ipad development, Fall 2011, both HD and SD versions.
While an example of a video that just shows the initial image but doesn't play is Harvard's Statistics 110. If you adjust the time of the video, the video moves to that part of the video but only shows the image at that time, ex. at 13:02, but doesn't play.
I've tried reinstalling quicktime first, then itunes. I've also tried putting directdraw in safe mode, but the problem videos still won't play.
Could it be some setting, since it plays when the file is downloaded but won't play straight from itunes store online (ie. pressing the play button beside the video in the itunes list).
Help pls.You might have more luck asking on a general Windows troubleshooting site, but my guess would be an invalid or old audio or CD driver (or firmware in the drive). You might try checking those to make sure you have the correct and most current drivers.
-
I have sideloaded a windows 8.1 app for mutiple
users in the device using the following command in windows power shell:-
DISM /Online /Add-ProvisionedAppxPackage /PackagePath:”packagepath” /SkipLicense
Now i want to un-install the same app for mutiple
users in windows 8.1 since i want to install latest package of that app but i am not able to un-install the app for mutiple
users in windows 8.1 using windows power shell
This is what i have tried :-
DISM.exe /Online /Remove-ProvisionedAppxPackage /PackageName: "PackageFullName"
This what the error i am getting:-
Deployment Image Servicing and Management tool
Version: 6.3.9600.17031
Image Version: 6.3.9600.17031
Error: 2
The system cannot find the file specified.
The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
Am i missing anything ??
1)How to un-install a specific app for mutiple users in windows 8.1 using windows power shell??????
2)What are the variousways/Alternatives to un-install a specific app for mutiple users in windows 8.1 using windows power shell??????
Please let me know
Looking forward for your response
Thanks in advanceI am getting the same error, though I have verified the package name is correct. I am trying to uninstall the Reader App from a captured WIM (offline). Any suggestions?
dism /image:c\mount Get-ProvisionedAppxPackage Result:
DisplayName : Microsoft.Reader
Version : 2013.822.1823.785
Architecture : neutral
ResourceId : ~
PackageName : Microsoft.Reader_2013.822.1823.785_neutral_~_8wekyb3d8bbwe
Attempt to remove the app returns this same error message:
C:\WINDOWS\system32>dism /image:c:\mount /remove-provisionedappxpackage /Package
Name:Microsoft.Reader_2013.822.1823.785_neutral_~_8wekyb3d8bbwe
Deployment Image Servicing and Management tool
Version: 6.3.9600.17031
Image Version: 6.3.9600.17031
Error: 2
The system cannot find the file specified.
The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log
The error is accompanied by the following entries in the error log:
2015-04-14 12:44:53, Error DISM DISM Appx Provider: PID=9000 TID=8104 Failed to get staged packages for package 'Microsoft.Reader_2013.822.1823.785_neutral_~_8wekyb3d8bbwe'.
- CPackageAdapter::CreateForRemove(hr:0x80070002)
2015-04-14 12:44:53, Error DISM DISM Appx Provider: PID=9000 TID=8104 Failed while initializing package adapter for package 'Microsoft.Reader_2013.822.1823.785_neutral_~_8wekyb3d8bbwe'
- CAppxManager::RemoveAllUserAppx(hr:0x80070002)
2015-04-14 12:44:53, Error DISM DISM Appx Provider: PID=9000 TID=8104 Failed to remove package 'Microsoft.Reader_2013.822.1823.785_neutral_~_8wekyb3d8bbwe'
- CAppxManager::ProcessCommandRemoveAllUserAppx(hr:0x80070002)
2015-04-14 12:44:53, Error DISM DISM Appx Provider: PID=9000 TID=8104 Failed processing command to remove Appx package - CAppxManager::ExecuteCmdLine(hr:0x80070002) -
Accidentally deleted the root user from my directory Mac 10.7.5
While trying to disable the root user (because I heard that it should be used sparingly) I think that I deleted it from the directory. Whenever I try a sudo command I get sudo: Command not found. I'm pretty sure this is a problem and some help would be nice.
Thank You!Back up all data.
Boot into Recovery by holding down the key combination command-R at the startup chime. Release the keys when you see a gray screen with a spinning dial.
Note: You need an always-on Ethernet or Wi-Fi connection to the Internet to use Recovery. It won’t work with USB or PPPoE modems, or with proxy servers, or with networks that require a certificate for authentication.
When the OS X Utilities screen appears, follow the prompts to reinstall the OS. You don't need to erase the boot volume, and you won't need your backup unless something goes wrong. If your Mac was upgraded from an older version of OS X, you’ll need the Apple ID and password you used to upgrade, so make a note of those before you begin. -
Get all users from Active Directory
Dear All,
I would like to retreive all USERS from the AD.
I finaly could connect to an AD server but I couldn't perform the search.
I got a javax.naming.NamingException: [LDAP: error code 1 - 000020D6: SvcErr: DSID-03100690, problem 5012 (DIR_ERROR), data 0
--> Does it mean that my query is incorect.
I think I am missing something obvious. but what?
Can somebody please help me or point me to some working code sample.
Thanks in advance.
Karim.
//======== Test Code =============
String THIS_INIT_CONT_FAC="com.sun.jndi.ldap.LdapCtxFactory";
String THIS_PROV_URL=url;
String THIS_SEC_AUTH="simple";
String THIS_SEARCHBASE="CN=Users, CN=domain, CN=com";
String THIS_ATTRS[] = {"mail"};
try {
String THIS_FILTER="(objectClass=user)";
System.out.println("Testing LDAP Program");
System.out.println("************************************************************");
String THIS_SEC_PRIN="";
String THIS_SEC_CRED="";
System.out.println("Cont Fac : " + THIS_INIT_CONT_FAC);
System.out.println("LDAP Server : " + THIS_PROV_URL);
System.out.println("Auth Method : " + THIS_SEC_AUTH);
System.out.println("Search Base : " + THIS_SEARCHBASE);
System.out.println("Filter : " + THIS_FILTER);
System.out.println("Login : " + THIS_SEC_PRIN);
System.out.println("Credentials : " + THIS_SEC_CRED);
System.out.println("************************************************************");
Hashtable env=new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, THIS_INIT_CONT_FAC);
env.put(Context.PROVIDER_URL, THIS_PROV_URL);
env.put(Context.SECURITY_AUTHENTICATION, THIS_SEC_AUTH);
env.put(Context.SECURITY_PRINCIPAL, THIS_SEC_PRIN);
env.put(Context.SECURITY_CREDENTIALS, THIS_SEC_CRED);
DirContext ctx = new InitialDirContext(env);
System.out.println("LDAP TEST Login Successful!");
SearchControls constraints = new SearchControls();
constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
NamingEnumeration results = ctx.search(THIS_SEARCHBASE,THIS_FILTER, constraints);
int namecount=0;
System.out.println("LDAP TEST Results : " + results);
System.out.println("LDAP TEST Pre-Hit ! ");
} catch(AuthenticationException ae) {
ae.printStackTrace();
System.out.println("Incorrect Password or UserName");
return false;
} catch(Exception e) {
e.printStackTrace();
System.out.println("Error accessing LDAP");
return false;
// ============ OUTPUT =====================
Testing LDAP Program
Cont Fac : com.sun.jndi.ldap.LdapCtxFactory
LDAP Server : ldap://192.168.2.3:389/
Auth Method : simple
Search Base : CN=Users, CN=domain, CN=com
Filter : (objectClass=user)
Login :
Credentials :
LDAP TEST Login Successful!
javax.naming.NamingException: [LDAP: error code 1 - 000020D6: SvcErr: DSID-03100690, problem 5012 (DIR_ERROR), data 0
If you want to list all the users then you don't need to perform a search. Just list them.
private void list(String contextName)
try
// get enumeration of NameValuePairs
NamingEnumeration contentsEnum = ctx.list(contextName);
while (contentsEnum.hasMore())
System.out.println(contentsEnum.next());
catch (NamingException e)
System.err.println("Problem listing context contents: " + e);
}You will want to call this using something like this:
list("CN=Users, CN=domain, CN=com");One caveat, there is a restriction on the number of results returned so this will still throw an LDAP exception if you have a lot of users.
Not sure how to get around that. Never needed to look. Don't expect it is hard though. -
NFS or FTP to Pick files from Windows Directory
Hi All,
I am working of File to File Scenario. PI needs to pick a file placed in Windows Directory. I have configured the scenario as NFS and given the proper Folder path and file name. PI is not able to Pick the file. It is saying "Configured Directory Does not Exists".
Both PI (HP Unix) and Windows systems are in same network. Do I need to use FTP for this scenario? Is there any way to access the files in Windows Directory using NFS protocol?
Thanks.Hi Achuth,
Ask you BASIS person to create one shared folder in PI Server(HP Unix) and use that directory in channel.
thanks,
madhu -
Unable to change domain logon password from Windows 8.1 system
We are facing a new problem in our domain. Users working on windows 8.1 platform are not able to change the password and getting an error "the security database on the server does not have a computer for this workstation". I tried deleting the
computer from domain and rejoined to the domain but did not help.
We are running Windows 2008 standard 64 bit Domain Controller and Active Directory functional level is Windows Server 2003. Please help with a solution.Thanks Marius, but we do not have R2.. It is just Win 2008 Std with SP2
The same applies to Windows Server 2003 and Windows Server 2008 as well so far I know, you have to call Microsoft and ask for back-port hotfix. Can you check if the password has been updated for the krbtgt account?
You can use repadmin lik this, just replace the DCNAME and the DN to much your own environment:
repadmin /showobjmeta eur-fle-dc02 "CN=krbtgt,CN=users,DC=e
r,DC=corp,DC=chrisse,DC=com"
35 entries.
Loc.USN Originating DSA Org.USN Org.Time/Date
Ver Attribute
======= =============== ========= =============
=== =========
7202 dc95de70-859e-4f39-a489-73380dd1896f 12299 2005-03-19 16:40:16
2 unicodePwd
Note "2" for unicodePwd it means that the password for the account has been updated 2 times.
If the above doesn't apply to you, have you changed any ACLs recently? and dose it work on Windows 7 for example?
Enfo Zipper
Christoffer Andersson – Principal Advisor
http://blogs.chrisse.se - Directory Services Blog -
How to get Primary Group details of a user from Active Directory
Hi ,
This is Viswanath. I want to know how can we retrieve the primary group of a user (Active Directory). I have searhed the entire forum but could not get the required information.
The reference link is which i have searched is : http://forum.java.sun.com/thread.jspa?threadID=581444
I got a sample .NET project where we can retrieve the primary group information :
refer to the link : http://dunnry.com/blog/DeterminingYourPrimaryGroupInActiveDirectoryUsingNET.aspx
you can download the sample project and build that in VS.NET 2003 and see the result. Please let me know if this kind of implementation is possible in java.
Kindly help me as i have to provide a solution to my client.
Regards,
Viswanath.
Edited by: sriganesh on Jun 22, 2008 10:36 AM
can anybody please share their thoughts on the aboveTo connect to the Active Directory you can do something like this:
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
public class AD
public static void main(String[] args)
Hashtable environment = new Hashtable();
//Just change your user here
String myUser = "myUser";
//Just change your user password here
String myPassword = "myUser";
//Just change your domain name here
String myDomain = "myDomain";
//Host name or IP
String myActiveDirectoryServer = "192.168.0.20";
environment.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
environment.put(Context.PROVIDER_URL, "ldap://" + myActiveDirectoryServer + ":389");
environment.put(Context.SECURITY_AUTHENTICATION, "simple");
environment.put(Context.SECURITY_PRINCIPAL, "CN=" + myUser + ",CN=Users,DC=" + myDomain + ",DC=COM");
environment.put(Context.SECURITY_CREDENTIALS, myPassword);
try
DirContext context = new InitialDirContext(environment);
System.out.println("Exit!!");
catch (NamingException e)
e.printStackTrace();
Reddy Pathepuram
Inteligic Inc -
Migrating Spatial user from windows to solaris
Hi,
I have a user with Spatial tables in oracle 8.1.6 on windows 2000.I want to move this user in to another 8.1.6 database on Solaris unix. When i tried to export the user it gives error with index metadata. If I still import on solaris it misses all spatial indexes.
Is there any workaround for this problem?
Thanks in Advance.
Shiva
nullHi Dan,
I tryed with both the options. First i inserted some values in to USER_SDO_GEOM_METADATA through following SQL:
insert into USER_SDO_GEOM_METADATA
values('COUNTY', 'GEOM',
mdsys.sdo_dim_array(
mdsys.sdo_dim_element('X',-92,-94,0),
mdsys.sdo_dim_element('Y',42,44,0)),
NULL);
And i also tryed with creating a table USER_SDO_GEOM_METADATA with some sample values. But it did't work.
The indexe's on table county in original schema are
INDEX_NAME INDEX_TYPE
------------------------------ --------------COUNTY_SDX DOMAIN
NET$DIRECTIONS_IDX NORMAL
RIVERS_SPX DOMAIN
STREAMS_SDX DOMAIN
STREETS_IDX NORMAL
STREETS_SNDX_IDX FUNCTION-BASED NORMAL
STREETS_SPX DOMAIN
SYS_IL0000023485C00007$$ LOB
SYS_IL0000023485C00008$$ LOB
SYS_IL0000023495C00007$$ LOB
SYS_IL0000023495C00008$$ LOB
SYS_IL0000023502C00007$$ LOB
SYS_IL0000023502C00008$$ LOB
SYS_IL0000023507C00007$$ LOB
SYS_IL0000023507C00008$$ LOB
And the index's i have after import are
INDEX_NAME INDEX_TYPE
SYS_IL0000025235C00007$$ LOB
SYS_IL0000025235C00008$$ LOB
Other index's are still missing.
Thanks for the help.
Shiva -
Retrieving the files from inbound directory using RZL_READ_DIR
Hi,
I am using the function module RZL_READ_DIR to pick the files from AL11 (application server) some times it is picking all files and in foreground also it is picking the all files from AL11, but in background sometimes it is not picking the files but when i check in foreground all the files are showing , after 2 or 3 days the function module is picking those files also from background .
please suggest what would be the reason for not picking in background?
Any help please.
Thanks
Kiran
Edited by: kiran sure on Sep 21, 2010 8:25 AMNote that the domain for your input parameter is of type text200. TEXT* domains in SAP support upper/lower. Supply the value to the FM in the needed case (by inserting the value into a declared variable of type text200) and the FM will work.
-
Can retrieve users from some sub OUs and from other sub OUs cann't
hi,
I am using Windows 2003 Active Directory Server and Jndi to access that in my application. I am using follwing code to retrieve all Users from a aprticular OU.
ctx = new InitialDirContext(environment);
SearchControls ctls = new SearchControls();
ctls.setSearchScope(2);
String attrs[] = {
"sn", "givenName", "userPrincipalName"
ctls.setReturningAttributes(attrs);
String filter = "(&(objectClass=*))";
String serachCriteria[] = {"User Container", "Admin Leads,OU=Administration,OU=User Container"};
for(int i = 0; i < serachCriteria.length; i++)
StringBuffer searchString = new StringBuffer("OU=");
searchString.append(serachCriteria);
searchString.append(",DC=india,DC=mycompany,DC=com");
for(NamingEnumeration answer = ctx.search(searchString.toString(), filter, ctls); answer.hasMoreElements();)
SearchResult searchResult = (SearchResult)answer.next();
....................and so on
as can be observed in the bold text above, I have to specify the path of sub OU to retrieve users under that. Whereas apart from this sub OU, it is retrieving users from others sub OUs. The problem is, the code can access users from some OUs but not from other sub OUs
Can anybody help?
regards,
ZaidActive Directory has a very rich access control model.
Perhaps it may not have occurred to you, that you do not have list access rights to the child3 & child9 organizational units ?
You may have access rights to all the leaf objects contained in child3 & child9, which explains why you can retrieve all the leaf objects when you explicitly bind to them, however you may not have list access rights to child3 & child9 which explains why you can't bind to it when iterating through parent1.
What happens if you simply perform a one level search on parent1, using a filter (objectClass=organizationalUnit) ?
If it doesn't retrieve child3 & child9, then perhaps you do not have list access rights for those two ou's. -
SharePoint 2010 Central Admin to add users from AD from specific Department
Dear All,
I am working on SharePoint Foundation 2010. I have to add users from specific department to a particular site collection.
Please let me know if there is a way to import users from Active Directory based on the 'Department' filed in
SPCA.
Thanks.Is that okay if I share the PowerShell code? Do you have access to Active Directory and can you query information?
Refer this Link
Code
# set site collection owner for all sites...
# 1-2012
Add-PSSnapin Microsoft.SharePoint.PowerShell
# $AccountList is an array of Windows Identities in the format of $AccountList = @("DOMAIN\USERID" , "DOMAIN\USERID2")
$accountList = @(Get-ADUser -Filter {(Department -like '*Ur Needs*')})
#$AccountList = @("LAB\Jack", "Lab\tom", "Lab\dick", "lab\harry")
#this gets an array of objects representing the sites at the IIS level:
$IISSites = Get-SPWebApplication
Foreach($oneIISSite in $IISSites)
#using .Sites, we can get a list of the site collections
foreach ($SharepointSiteCollection in $oneIISSite.Sites)
write-host $SharepointSiteCollection.url -ForegroundColor Cyan
$spweb = Get-SPWeb $SharepointSiteCollection.url
#now we have the website, so lets look at each account in our array
foreach ($Account in $AccountList.samaccountname)
#lets see if the user already exists
Write-host "Looking to see if User " $account " is a member on " $SharepointSiteCollection.url -foregroundcolor Blue
$user = Get-SPUSER -identity $Account -web $SharepointSiteCollection.url -ErrorAction SilentlyContinue #This will throw an error if the user does not exist
if ($user -eq $null)
#if the user did NOT exist, then we will add them here.
$SPWeb.ALLUsers.ADD($Account, "", "", "Added by AdminScript")
$user = Get-SPUSER -identity $Account -web $SharepointSiteCollection.url
Write-host "Added user $Account to URL $SPWeb.URL" -Foregroundcolor Magenta
else
Write-host "user $Account was already in URL " $SPWeb.URL -Foregroundcolor DarkGreen
if ($user.IsSiteAdmin -ne $true)
$user.IsSiteAdmin = $true
$user.Update()
Write-host "$account has been made an admin on $SPWeb.URL" -Foregroundcolor Magenta
else
Write-host "$account was already an admin on $SPWeb.URL" -Foregroundcolor DarkGreen
$SharePointSiteCollection.Dispose()
Note:
First uncomment the second $accountlist add the user manually to test
If you have AD module installed in your SP server you can use
$accountList = @(Get-ADUser -Filter {(Department -like '*Ur Needs*')})
Regards Chen V [MCTS SharePoint 2010]
Maybe you are looking for
-
How can I make my user input on the same line as the question?
The only way I know of doing it is System.out.println ("Please enter an uppercase letter of the English Alphabet: "); letter = dataIn.readLine ();But that makes Please enter an uppercase letter of the English Alphabet: **User input here, a
-
External hardrive to use with Imac - how to format and to what?
i have my external hardrive i use with my pc how and to what should i format it so i can use ut with leopard and timemachine, also is it possible to make 2 partiton on it so one partition would still be windows format so i can backup windows on it to
-
Hi, I want to get the details of the USER who did the Payment Run using F110.Neither REUGH nor REGUP is storing those details.There is a table called REGUA which is having the details but not for every run. Do anyone here know the table which stoes t
-
Sorting my Podcasts/Smart Playlist
I used to be able to sort my podcasts in a smart playlist, from my highest rating to lowest rating. I must have done something, but now my podcasts are no longer in the same rated order after syncing to my iPhone. I know I am doing something wrong cu
-
Difficulties in accessing certain websites
Hi, I hope someone can help me here. I am using Airport to connect to the internet, and about three weeks ago certain webpages suddenly refused to load for me (for example yahoo, the apple home page, facebook, amongst others). Other websites load per