w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Using linux, how can I create a device file outside of the /dev directory that will give me permission to open and read it?
Device files are created with mknod. Permissions and owner can be changed with chmod and chown respectively. If the device file already exists, you may want to create a symbolic link to it instead using ln -s.

Categories : Linux

Give a user only permission to /var/www/dir/
@fedorqui answer(comment) Is great. But there is other way to achieve this. I don't see in your question that the user need an SSH connection. Some FTP software(server) like vsftpd allow to chroot/jail a user into a folder/home directly in their configuration. More over you may deny the user to connect via ssh directly in OpenSsh configuration here some link that might help with the configuration if you choose vsftpd Chroot/jail a user, Deny direct ssh connection with openssh , Hope it helped

Categories : Linux

Log out facebook when user doesn't give permission
No, the user decides when he is logged out or logged in on Facebook, you cannot decide for him on this issue or even add such a button. You need to adapt your application to handle that case instead, you cannot log out a user, but you can know if that user is logged in or not, and display your application accordingly.

Categories : PHP

I need to give my "web browser user" permission to run code
www-data is one of the users that web servers run as. You don't need to change its permissions for it to access your code - you need to change your code's. The easiest way to do that is to make your code world-readable - something like: chmod -R 644 /fullpath will do it. chmod changes permissions; -R makes it run recursively; 644 sets the permissions to readable for Group and World (and you get Read, Write privileges); and the final parameter is the path to run this on. You'll need to check that you don't have anything in that directory that you need Execute permission for, as the code as written will remove that permission and you'll need to add it back in.

Categories : PHP

c# connecting to Active Directory over ssl give ldap server unavailable
LdapConnection ldapConnection = new LdapConnection(server + ":" + port); ldapConnection.AuthType = AuthType.Basic; ldapConnection.Credential = new System.Net.NetworkCredential(username, password); ldapConnection.SessionOptions.ProtocolVersion = 3; if (sslEnabled) { ldapConnection.SessionOptions.SecureSocketLayer = sslEnabled; } This is what I did and I am able to connect to AD over SSL. You said you have Java program connecting to the same server over SSL. Are you running the Java program from the same machine as your c#? if not and in case of a self signed certificate in AD, install that certificate in your client machine and try.

Categories : Dotnet

Authentication against Active Directory using a Mobile Device
Take a look at the BUILD 2013 videos. Visual Studio 2013 will create a webproject that will automagically do all that for you (I think). Just bare in mind, it uses the Microsoft.OWin.Security beta packages. Also...you will need to install the AspNetWebTools2013 package first... http://www.asp.net/visual-studio/overview/2013/creating-web-projects-in-visual-studio#orgauthoptions

Categories : Vb.Net

Does accessing a user's iTunes library on an iOS device require permission?
Accessing the song list does not require a permission (iOS6 and iOS7). According to Apple (link for iOS6), Data Privacy section, In addition to location data, the system now asks the user’s permission before allowing third-party apps to access certain user data, including: Contacts, Calendars, Reminders, Photo Library. This policy has not changed for the newly-released iOS7: iOS is designed to put your privacy first. For example, if an app wants your location information or data from Calendar, Contacts, Reminders, or Photos, it needs your permission first.

Categories : IOS

How to disable scrolling and re-enable scrolling on a mobile touch screen device
Try this code : var scroll = true $(document).bind('touchmove', function(){ scroll = false }).unbind('touchmove', function(){ scroll = true }) $(window).scroll(function() { if ($('button').is(':checked') && scroll == false) { $(document).scrollTop(0); } })

Categories : Javascript

How to get user Data from LDAP Active directory?
I got the solution: - I have change my filter variable and it starts working ..:) Here is my class and methods used: class LdapDataReciver: def get_access_token(self,data): user_detail = {'user_name':data} auth = HMAAuthentication(expire_duration=4*60*60) access_token = auth.create_access_token(user_detail) return access_token def get_group(self,list): groups=[] try: for entry in list: cn = entry.split(' ') cn1 = cn[0].split('=') groups.append(cn1[1]) return groups; except : raise AuthenticationException("userName does not exist") def authenticate_with_active_directory(self,username,password): try: l = ldap.initialize(settings.LDAP_URL) l.simple_bind(username, password)

Categories : Django

Active Directory authentication through ssl as anonymous user
I did some research and found other applications having similar issues. 1. Make sure you have imported your certificates into the keystore according to the Connect to LDAP or Other Services Via SSL instructions. 2. Make sure any certificates have been imported into the correct keystore; you may have multiple JDKs.

Categories : Java

Using Active Directory/LDAP to Login user in ASP.NET 3.5 app
You can go over the PrincipalContext Like this: using (PrincipalContext pc = new PrincipalContext(ContextType.Domain, myDomainTextBox.Text)) { // validate the credentials bool cIsValid = pc.ValidateCredentials(myUserNameTextBox.Text, myPasswordBox.Password); if (cIsValid) { // Do some stuff } }

Categories : C#

Searching User In Active Directory By Full Name
Change "... name='" & var5 & "'" to either "... displayName='" & var5 & "'" or "... sn='" & lastname & "' and givenName='" & firstname & "'" For the latter you need 2 variables: one with the first and the other with the last name.

Categories : Search

Using Active Directory to login using a local user
This is all that the Websecurity.Login method does: public static bool Login(string userName, string password, bool persistCookie = false) { WebSecurity.VerifyProvider(); bool flag = Membership.ValidateUser(userName, password); if (flag) { FormsAuthentication.SetAuthCookie(userName, persistCookie); } return flag; } You can write your own method that authenticates against AD and then looks up the user name and the does sets the auth cookie something like: public static bool MyLogin(string userName, string password, bool persistCookie = false) { bool flag = CheckADUser(userName, password); if (flag) { string mappedUsername = GetMappedUser(userName); if(mappedUsername != "") { FormsAuthentication.SetAuthCooki

Categories : C#

Permission Denial: startActivity asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
1)In linux every user has an id number. 0 and -2 are User IDs (UIDs). 0 is root, -2 is some random user (which may not be a person, it may just be a fake account used for internal reasons). 2)Any book on Linux. Android is just a graphical framework on top of Linux. 3)Yes, just add the permission.

Categories : Android

retrieve and display user image from active directory with c#
You should add an img tag with a src url to your handler you wrote (which should arguably be a HttpHandler for Web Forms) I'd imagine the url would look like <img src="http://myintranetsite/ADImageHandler alt="" />

Categories : C#

c# Active Directory Authentication User if Computer not in domain
I've tried this one. The computer now i'm using is not in domain. try { DirectoryContext context = new DirectoryContext(DirectoryContextType.DirectoryServer, "IP", "Username", "Password"); DirectoryEntry deDoc = Domain.GetDomain(context).GetDirectoryEntry(); } catch (Exception ex) { MessageBox.Show(ex.Message); }

Categories : C#

Active Directory LDAP move user to different OU - Ruby
This is how we solved it: @ldap.rename(olddn: user.dn, newrdn: "CN=#{user.cn}", delete_attributes: true, new_superior: "#{new_ou}") We also used the version of ldap-ruby on Github not the version on RubyGems.

Categories : Ruby

How to return user details from the Active Directory using PrincipalContext
I don't understand why you are mixing the new PrincipalContext with the old DirectoryEntry stuff. Doesn't make any sense..... Also - you're searching for all users, but in the end, you're returning only a single DirectoryEntry - why?!? If you're using the new PrincipalContext - then use the UserPrincipal - it contains nice and easy to use properties about the user - much easier to use and work with than the old DirectoryEntry stuf.... public List<UserPrincipal> GetAllUsersDetails() { using (var context = new PrincipalContext(ContextType.Domain, "WIN-SPDEV.com")) using (var searcher = new PrincipalSearcher(new UserPrincipal(context))) { var searchResults = searcher.FindAll(); List<UserPrincipal> results = new List<UserPrincipal>();

Categories : Asp Net

Query Active Directory in Java using a logged on user on windows
I'm going off of this guy's post. You can go with the commercial Jespa library, which uses NTLMv2. Or you can go with the open source com4j project that uses ADSI, created by Kohsuke Kawaguchi.

Categories : Java

To retrieve logged in user's Active directory data from Websphere
Logged on user is represented as a set of principals within JAAS subject. Information like user name or email is not present there and is not supposed to. You have no other option other than query LDAP (Active Directory in your case). The statement like "i have already connected to active directory" does not make much sense. Yes, the user is authenticated by WAS through AD, but this does not mean that any sort of persistent connection exists.

Categories : Java

I need a script to detect if a computer is in an active directory user group
You could try something like this in PowerShell to check that the named computer is in the OU or not: Script: import-module activedirectory $OU = @() $CheckOU = "LaptopOU" $computerName = "Laptop12345" $user = get-adcomputer $computerName -Properties * $user.DistinguishedName -split "," | %{If($_ -match "OU="){$OU += $_ -replace "OU=",""}} If($OU -match $CheckOU){ "Computer:$computerName is in the OU:$CheckOU" # Do something... } Else{ "Computer:$computerName is not in the OU:$CheckOU" # Do something else.. } This will take a $computerName and get all the OU's that it's in from Active Directory and stores them in an $OU array. Then you can use that array to simply check if the computer is in the given OU ($CheckOU) or not by using the -match operator. Note: You

Categories : Powershell

Get active directory user group property in asp.net website - web.config
'I don't know if you can get this information by a web.config setting, but you can get this information from the System.DirectoryServices.AccountManagement namespace. (if you're looking per user) You could store the domain name in the appsettings of the web.config and do something like... private static PrincipalContext _ctx = new PrincipalContext(ContextType.Domain, System.Configuration.ConfigurationManager.AppSettings["DomainName"]); public List<string> UserGroups(string userName) { List<string> ret = new List<string>(); using (UserPrincipal user = UserPrincipal.FindByIdentity(_ctx, userName)) { if (user != null) { foreach (Principal p in user.GetAuthorizationGroups()) { ret.Add(p.Name); } } }

Categories : C#

Determine User Active Directory Groups from Local Machine off Network
From the top: My current project requires that I validate a user against Active Directory groups. The catch is, the computer may not always be connected to the domain but users may still need to run the tool. At this point, you must therefore accept that any enforced security is able to be bypassed by an attacker since it is entirely enforced on the client. Not exactly part of the solution, but keep it in mind. I understand that I can't query Active Directory while I'm not connected, instead I'm trying to query the Machine SAM (MSAM). The Security Accounts Manager only stores the local accounts (MACHINENAMEAdministrator and others). It will not have domain user credentials. You are thinking of the LSA cache, which remembers the last N domain logins's credentials (where

Categories : C#

I want to add a random generated password to my newly created Active Directory User
This is written so that $sourceData can be a string like the following. If you really want to pass $sourcedata as an array of char remove the [char[]] cast from the function. $sourcedata="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-$" Function GET-Temppassword() { Param( [int]$length=10, [string[]]$sourcedata ) -join ([char[]] $sourcedata | GET-RANDOM -count $length) } get-temppassword $sourceData 20 GVTXxF13ibnBK5AQOu-P

Categories : Powershell

How do I create a batch script that creates a task for a specific user in the Active Directory?
For it to run as that user you need to specify both username and password. schtasks.exe /create /? [snip] /U username Specifies the user context under which the command should execute. /P password Specifies the password for the given user context. [snip] So, for user 'jsmith', with password 'password1', your command will end up looking something like: schtasks.exe /create /u jsmith /p password1 /sc once /tn defrag /tr "\compnameC$Windowssystem32defrag.exe c:" /st 14:33:00

Categories : Windows

Authenticate user against active directory using MVC4 forms with optional input domainusername or just username
You could try to use double authentication solution using both Membership and PrincipalContext public bool ActiveDirectoryAuthentication(string username, string password) { var splittedCredentials = username.Split(new[] { "\" }, StringSplitOptions.None); switch (splittedCredentials.Length) { case 1: { var authenticated = Membership.ValidateUser(username, password); if (authenticated) { FormsAuthentication.SetAuthCookie(username, false); } return authenticated; } case 2: { var principalContext = new PrincipalContext(ContextType.Domain, splittedCreden

Categories : C#

Disable autochange scrollbar position (disable scroll to active control)
Find the same question here How can I disable the scroll-into-view behavior of TScrollBox? In my case I use override AutoScrollInView procedure. Disable implemention of this procedure at all. procedure TfrSection.AutoScrollInView(AControl: TControl); begin // inherited; end; It works.

Categories : Delphi

Grails with Shiro - How to assign specifice permission to perticular user even he has role based permission
Don't know how to do this using pure shiro API, but it can be done using grails filters Something like this import org.apache.shiro.SecurityUtils import org.apache.shiro.subject.Subject class ProjectFilters { def filters = { all(controller: 'Person', action: '*') { before = { Subject subject = SecurityUtils.getSubject() //boolean hasRole = subject.hasRole('ROLE_DEVELOPER') //boolean hasPermission = subject.isPermitted('Person') if (/*your logic here*/) { redirect(uri: '/access-denied') return false } } } } }

Categories : Grails

How to write a Validation inside my model class to check if the user is Inside Active Directory or not
Please try this code: var searchResults = searcher.FindAll(); foreach (Principal p in searchResults) { if(p.SamAccountName == User.Identity.Name) { //your in! } }

Categories : C#

Active Directory user entry, and group entry
Use the below code PrincipalContext ouContex = new PrincipalContext(ContextType.Domain, "TestDomain.local", "OU=TestOU,DC=TestDomain,DC=local"); for (int i = 0; i < 3; i++) { try { UserPrincipal up = new UserPrincipal(ouContex); up.SamAccountName = "TestUser" + i; up.SetPassword("password"); up.Enabled = true; up.ExpirePasswordNow(); up.Save(); } catch (Exception ex) { } }

Categories : C#

Enable/Disable Scrolling in iPhone/iPad’s BUT enable the website scrolling
Check if the device is mobile using a function like this window.mobilecheck = function() { var check = false; (function(a){if(/(android|bbd+|meego).+mobile|avantgo|bada/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)/|plucker|pocket|psp|series(4|6)0|symbian|treo|up.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl

Categories : Javascript

how to give the permission of manage_mailbox on facebook apps
manage_mailbox seems to be an incorrect error message from FB. I got the same message when i was trying to post a private message using Graph API which i found out later is not possible. You have to use either FB's send dialog or use XMPP chat interface to be able to send private messages now.

Categories : Facebook

IIS 8, How do I give ASP.NET permission to write to a folder in Windows 8
(Moving my comment to an answer for sweet, sweet karma) I think the problem is the identity that your Anonymous requests are using. What is your IIS Anonymous Authentication identity set to? It might not be set to "Application pool identity" which would be causing your problems

Categories : Iis

Would it be possible in some way to hack an apk file to enable billing permission?
This should be possible using apktool, found here: http://ibotpeaches.github.io/Apktool/ You should be able to decode XML resources and repackage as an APK. Decompiling the apk is done as follows: java -jar apktool.jar decode app.apk app If it is just the billing permission that you need to add you will need to add the following line to the AndroidManifest.xml file: <uses-permission android:name="com.android.vending.BILLING" /> After you have made the necessary changes you can recompile into an apk using: java -jar apktool.jar build app app_new.apk Several other links that you may find useful: Android, is it possible to manually change somethings in manifest file directly from APK? How to view AndroidManifest.xml from APK file?

Categories : Android

How to set gecos attribute in Active Directory using directory services(C#)
I finally found the way to access the attribute. Instead of using directly the DirectoryEntry to connect to the LDAP such as : DirectoryEntry DEBase = new DirectoryEntry("LDAP://" + DomaineName); I used DirectoryContext context = new DirectoryContext(DirectoryContextType.Domain, domaineName)); DirectoryEntry dERoot = System.DirectoryServices.ActiveDirectory.Domain.GetDomain(context).GetDirectoryEntry(); Then I have no problem accessing the gecos attribute

Categories : C#

Give full permission to particular Java Swing application
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <jnlp codebase="http://searchengine.crazy-minds.com" href="launch.jnlp" spec="1.0+"> <information> <title>LogSearchEngine</title> <vendor>shilpi jain</vendor> <homepage href=""/> <description>LogSearchEngine</description> <description kind="short">LogSearchEngine</description> <offline-allowed/> </information> <update check="background"/> <resources> <j2se version="1.7+"/> <jar href="LogSearchEngine.jar" main="true"/> <jar href="lib/commons-logging-1.1.3.jar"/> <jar href="lib/log4j-1.2.17.jar"/> </resources> <application-desc main

Categories : Java

How to enable phone bluetooth programmatically, without the users permission?
Yes this is possible. btAdapter = BluetoothAdapter.getDefaultAdapter(); if (btAdapter == null) { // Device does not support Bluetooth Toast.makeText(getApplicationContext(), "Device does not support bluetooth", Toast.LENGTH_LONG).show(); } else { if (!btAdapter.isEnabled()) { btAdapter.enable(); Toast.makeText(getApplicationContext(), "Bluetooth switched ON", Toast.LENGTH_LONG).show(); }

Categories : Android

How to give path based permission to a specific group in Linux?
As indicated in the comments: You are looking for chroot. See for example this cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html to get a basic idea of it Then we commented: According to my understanding, I'll have to change many things like copying directories and stuff but I wanted to give access to the group only to a specific directory and nothing else. Is chroot the only solution for it? And my view is that if you want them to be jailed in that specific directory, yes. Otherwise they will be able to go through other dirs. Hope it helps!

Categories : Linux

How do a enable and keep active a div with a hover?
I'm adding another answer, because your revision is practically a different question. Your fiddle had several issues, including syntax errors. I updated it with the functionality you're looking for: http://jsfiddle.net/44jQa/51/ You should use this instead of animate: $(this).find('img').fadeTo(400,'.5'); Another issue is that this code is probably not cross-browser compatible. But it should give you an idea of what to do.

Categories : Jquery

How to check permission support for device?
It is not about permissions. All features that you used in your application cannot be supported by all android devices. Google Play automaticly sets up your supported device list by checking your application features. You can see that list in your google play accaount. Permissions are for using device features like GPS, Camera etc.. For example in order to use GPS you need to add this line to your Manifest file <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> Here is the details for permissions http://developer.android.com/reference/android/Manifest.permission.html

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.