How do I enable root in OS X 10.8.3?

I need the ability to change file ownership and location.  Having used migration assistant to copy a bunch of stuff from my Windows machine to my Mac, I have many directories of files that are now owned by other 'users'.  The migration tool requires a unique name for each session, and I have copied files in four different sessions.  Those files are now owned by those four other versions of me.  Now, I need to 'chown' all of this stuff and move it to the directories under my normal account.
I read a root how-to for previous versions of OS X, but the most recent of the examples doesn't work in Mt Lion.
Hlep!!
Thanks,
Joe

Thanks for the imprssively quick response.  Between sudo chown and sudo chmod, everything is under control.  The hard core moving and organinzing can happen now.
Thanks to all who responded!!!
Joe

Similar Messages

  • How do I enable root user in OS X 10.7 Lion?

    How do I enable root user within Lion? I've looked online, and I've been instructed to launch the 'Director Utility', but I cannot find this ANYWHERE in Lion. It's not in my Utilities folder. Can anyone offer any advice as to how to enable the root login? Thanks.

    EDIT: Problem solved! For anyone looking for this file, it's located in System/Library/CoreServices.

  • Very strange: can not enable root.

    One of my old G4 behaves very strange, unless everything is running very well, I can't log in as root.
    Also after enabling root in NetInfo manager, I can't login as root, neither as user nor using SSH.
    I resetted the Pasword using the Install-DVD. But still no effect.
    Finally i deleted the root account using NetInfoManager and deleted the root home dirctory /private/var/root.
    So I was able to activate root in NIM again, restarted the local NetInfo-Domain and again: nothing.
    It is complete impossible to log into this machine as root. But I have to.
    Making a complete new install on this mac will cost me at least one day, so this is not an option.
    Workin since ever with lots of macs, I never faced such a strange thing. Please help!

    Should the features and access you require not work in 10.4.11, you may have to
    consider installing a new system folder and update that; if the issue really is one
    of some unusual happening and the superuser or root user is inaccessible.
    Are you sure you really need root user access? There are other ways to do stuff.
    You appear to have already tried the basic steps to gain root level access:
    "Enabling the Root User" - an Apple Help 10.4 support document:
    - http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh1549.html
    This thread really does show more than one way to handle the issue...
    "How do I enable root user? - 10.5.x"
    {includes a 'command line editor" discussion - and other detailed options}
    - http://discussions.apple.com/thread.jspa?threadID=1910434&tstart=0
    There may also be some helpful access to command line and other
    super user or unix baseline methods in the OnyX utility from Titanium
    Software, the free-running user interface utility. I've seen this section
    in there but have no need presently to experiment with it.
    In any event, see if the second link above is helpful; it may be.
    Good luck & happy computing!

  • How to enable root user in Yosemite

    I see in SEARCH how to enable root user in LION but not Yosemite. Does anyone know how? The sys prefs button choices is different so can't find out how to do.

    Do a backup before doing anything. To delete them you will need to enable the Root User and log in as the Root User. You need to be very careful while logged in as the Root User because you can delete any file and could potentially ruin your system. As soon as the non-functioning applications are deleted, log out and use your normal account. Did I mention doing a backup?
    Root User

  • How to enable root on mac on 10.9.2 and how to set the password for the same ?

    how to enable root on mac on 10.9.2 and how to set the password for the same ?

    http://support.apple.com/kb/ht1528
    Follow the steps for Lion.
    But, why are you doing this? I've never found the need to do that.

  • How can I enable embedded pl/sql gateway to run on port 80

    I have a new 11G install on OEL 4.0, database created. I would like to be
    able to access the instance using the pl/sql gateway. Works fine with
    port 8080, the default. How to I enable it to run on port 80?
    I found this statement in the following docuementation:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb22pro.htm#ADXDB2500
    Using HTTP(S) on Nonstandard Ports
    By default, HTTP listens on a nonstandard, unprotected port: 8080. To use HTTP(S) on
    the standard port, such as 80, your DBA must chown the TNS listener to setuid ROOT
    rather than setuid ORACLE, and configure the port number in the Oracle XML DB
    configuration file /xdbconfig.xml.I have root priviledges on the box.
    I've tried setting the listener file permissions:
    chown root:dba /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr
    chmod 6775 /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr
    Also put root in the dba group.
    The permissions turn out like this:
    -rwsr-sr-x 1 root dba 830854 Jun 17 21:04 /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr
    I stopped the listener, bounced the database, and started the listener again.
    But it still shows the process being owned by oracle:
    oracle 29682 1 0 21:08 ? 00:00:00 /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr LISTENER -inherit
    Changing the port is easy:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SYS>select dbms_xdb.gethttpport as "HTTP-Port" , dbms_xdb.getftpport as "FTP-Port" from dual;
    HTTP-Port FTP-Port
    8080 2100
    At this point, I can access the apex home page with the following url:
    http://hostname:8080/apex/f?p=4550:10:1454849288245548
    I can than change it to port 80:
    SYS>begin
    dbms_xdb.sethttpport('80');
    dbms_xdb.setftpport('2100');
    end;
    2 3 4 5
    PL/SQL procedure successfully completed.
    SYS>SYS>select dbms_xdb.gethttpport as "HTTP-Port" , dbms_xdb.getftpport as "FTP-Port" from dual;
    HTTP-Port FTP-Port
    80 2100
    When I try to access apex with the following url:
    http://rmdcopslnx1.us.oracle.com/apex/f?p=4550:10:1454849288245548
    I get the following:
    Failed to Connect
    Firefox can't establish a connection to the server at hostname.com.
    Though the site seems valid, the browser was unable to establish a connection.
    * Could the site be temporarily unavailable? Try again later.
    * Are you unable to browse other sites? Check the computer's network connection.
    * Is your computer or network protected by a firewall or proxy? Incorrect settings
    * can interfere with Web browsing.I can set the port. Just can't talk to it.
    This is the entry from the listener log:
    <msg time='2008-07-03T15:40:09.741-06:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='hostname'
    host_addr='xxx.xxx.xxx.xxx'>
    <txt>TNS-12546: TNS:permission denied
    TNS-12560: TNS:protocol adapter error
    TNS-00516: Permission denied
    Linux Error: 13: Permission denied
    </txt>
    </msg>
    So this looks like an permissions problem. But where? I posted
    this on the apex forum here:
    Re: How can I enable embedded pl/sql gateway to run on port 80
    They suggested asking here.

    No, that thread did not provide the information that I need. Some more data:
    I have the port set to 8080:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SYS>select dbms_xdb.gethttpport as "HTTP-Port" , dbms_xdb.getftpport as "FTP-Port" from dual;
    HTTP-Port FTP-Port
    8080 2100
    At this point, I can access the apex home page with the following url:
    http://hostname:8080/apex/f?p=4550:10:1454849288245548
    I can than change it to port 80:
    SYS>begin
    dbms_xdb.sethttpport('80');
    dbms_xdb.setftpport('2100');
    end;
    2 3 4 5
    PL/SQL procedure successfully completed.
    SYS>SYS>select dbms_xdb.gethttpport as "HTTP-Port" , dbms_xdb.getftpport as "FTP-Port" from dual;
    HTTP-Port FTP-Port
    80 2100
    When I try to access apex with the following url:
    http://rmdcopslnx1.us.oracle.com/apex/f?p=4550:10:1454849288245548
    I get the following:
    Failed to Connect
    Firefox can't establish a connection to the server at hostname.com.
    Though the site seems valid, the browser was unable to establish a connection.
    * Could the site be temporarily unavailable? Try again later.
    * Are you unable to browse other sites? Check the computer's network connection.
    * Is your computer or network protected by a firewall or proxy? Incorrect settings can interfere with Web browsing.
    I can set the port. Just can't talk to it.

  • How do I reset 'root'

    Hi Guys,
    I've been playing round with the 'root' user in Terminal. I have one account and that is my system administrator account which I use for everyday use. I enabled 'root' in the directory utility and set a password for it. It worked fine. I'd go to the terminal and type "login root" (without the speech marks) and then login with the password I set. Great.
    But, today I tried logging in with root and it didn't work... I tried logging into the "other" account at the login screen, but that didn't work and my "Master Password' didn't work.. My Master Password, System Administrator password and root password were all the same.. I went to the directory utility and reset the root password, since I'm the system admin I'm not prompted for the old root password before it resets. I returned to the terminal and tried my new password, but it didn't work, same with the login....
    How do I reset the root password? The Single User mode commands have changed so I don't know how to reset from the shell.. I would like to avoid having to reinstall..

    Different problem. The admin password is not the ROOT password. Hence, my misunderstanding. You can find a solution here:
    Forgot Your Account Password
    For Lion, Mountain Lion, or Mavericks
        Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
         When the menubar appears select Terminal from the Utilities menu.
         Enter resetpassword at the prompt and press RETURN. Follow
         instructions in the dialog window that will appear.
         Or see Reset a Mac OS X 10.7 Lion Password, OS X Mountain Lion- Reset a login password,
         and OS X Lion- Apple ID can be used to reset your user account password.
    For Snow Leopard and earlier with installer DVD
         Mac OS X 10.6- If you forget your administrator password
    For Snow Leopard and earlier without installer DVD
        How to reset your Mac OS X password without an installer disc | MacYourself

  • How can I enable remote debug in weblogic to use with Rational RSA IDE?

    How can I enable the remote debugging technique so that I can work with my IDE.
    I use RSA by IBM as the IDE
    What should be the changes in the setdomainenv or startweblogic?
    I use 10.3
    Please help.. ur help is appreciable...

    Hi,
    I did not make any console adjustments for debugging on my WebLogic 10.3.2.0 - however I am running in development mode on an "adminServer" (an option during the install)
    In the console there is a debug setup page - that seems to have no effect for me (I can always debug) - so either it is a combination of development mode and/or the startWeblogic script from the Eclipse plugin.
    However, these debug settings are likely for debugging into the server - you only want to debug your own app code right?
    On the console page goto
    http://localhost:7001/console/console.portal?_nfpb=true&_pageLabel=ServerDebugPage
    servers | AdminServer | configuration-debug | expand weblogic
    I see...
    "Use this page to define debug settings for this server.
    Debug settings for this Server
    EnableDisableClear Showing 1 to 2 of 2 Previous Next
    Debug Scopes and Attributes State
    default Disabled
    weblogic Disabled
    EnableDisableClear Showing 1 to 2 of 2 Previous Next
    Try expanding the whole tree and selecting the root to enable everything.
    You will see the following
    10-Dec-2009 11:53:46 o'clock AM EST> <Warning> <Management> <BEA-141239> <The non-dynamic attribute DebugAbbreviation on weblogic.management.configuration.ServerDebugMBeanImpl@47a32e1b([base_domain]/Servers[AdminServer]/ServerDebug[AdminServer]) has been changed. This may require redeploying or rebooting configured entities>
    <10-Dec-2009 11:53:46 o'clock AM EST> <Warning> <Management> <BEA-141238> <A non-dynamic change has been made which affects the server AdminServer. This server must be rebooted in order to consume this change.>
    <10-Dec-2009 11:53:46 o'clock AM EST> <Warning> <netuix> <BEA-423420> <Redirect is executed in begin or refresh action. Redirect url is /console/console.portal?_nfpb=true&_pageLabel=ServerDebugPage.>
    When I debug WebLogic 10.3.2.0 from Eclipse 3.5 EE - I see the following in my server startup log which includes the "-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8453" you mentioned.
    Starting WLS with line:
    c:\opt\wls10320\JROCKI~1.5-3\bin\java -jrockit -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8453,server=y,suspend=n -Djava.compiler=NONE -Xms512m -Xmx512m -Dweblogic.Name=AdminServer -Djava.security.policy=C:\opt\wls10320\WLSERV~1.3\server\lib\weblogic.policy -Xverify:none -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole... -Dplatform.home=C:\opt\wls10320\WLSERV~1.3 -Dwls.home=C:\opt\wls10320\WLSERV~1.3\server -Dweblogic.home=C:\opt\wls10320\WLSERV~1.3\server -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=c:\opt\wls10320\patch_wls1032\profiles\default\sysext_manifest_classpath weblogic.Server
    Listening for transport dt_socket at address: 8453
    The server process listening on debug portl 8453 ooks like this
    Oracle WebLogic Server 11gR1 PatchSet 1 at localhost [Oracle WebLogic Launch Configuration]     
         BEA JRockit(R)[localhost:8453]     
              Thread [Main Thread] (Running)     
              Daemon Thread [Timer-0] (Running)     
              Daemon Thread [Timer-1] (Running)     
              Daemon Thread [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] (Running)     
              Daemon Thread [weblogic.time.TimeEventGenerator] (Running)     
              Daemon Thread [JMAPI event thread] (Running)     
              Daemon Thread [weblogic.timers.TimerThread] (Running)     
              Daemon Thread [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] (Running)     
              Daemon Thread [Thread-7] (Running)     
              Daemon Thread [ExecuteThread: '0' for queue: 'weblogic.socket.Muxer'] (Running)     
              Daemon Thread [ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'] (Running)     
    I hit a breakpoint and see
    Daemon Thread [[ACTIVE] ExecuteThread: '13' for queue: 'weblogic.kernel.Default (self-tuning)'] (Suspended (breakpoint at line 56 in ApplicationService))     
         ApplicationService_5ptwty_Impl(ApplicationService).insertObjects(List<Cell>) line: 56     
         NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]     
         NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39     
         DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25     
         Method.invoke(Object, Object...) line: 597     
         AopUtils.invokeJoinpointUsingReflection(Object, Method, Object[]) line: 310     
         ReflectiveMethodInvocation.invokeJoinpoint() line: 182     
         ReflectiveMethodInvocation.proceed() line: 149     
         DelegatingIntroductionInterceptor.doProceed(MethodInvocation) line: 131     
         DelegatingIntroductionInterceptor.invoke(MethodInvocation) line: 119     
         ReflectiveMethodInvocation.proceed() line: 171     
         MethodInvocationVisitorImpl.visit() line: 37     
         EnvironmentInterceptorCallbackImpl.callback(MethodInvocationVisitor) line: 55     
         EnvironmentInterceptor.invoke(MethodInvocation) line: 50     
         ReflectiveMethodInvocation.proceed() line: 171     
         ExposeInvocationInterceptor.invoke(MethodInvocation) line: 89     
         ReflectiveMethodInvocation.proceed() line: 171     
         DelegatingIntroductionInterceptor.doProceed(MethodInvocation) line: 131     
         DelegatingIntroductionInterceptor.invoke(MethodInvocation) line: 119     
         ReflectiveMethodInvocation.proceed() line: 171     
         JdkDynamicAopProxy.invoke(Object, Method, Object[]) line: 204     
         $Proxy68.insertObjects(List) line: not available     
         ApplicationService_5ptwty_ApplicationServiceLocalImpl.insertObjects(List<Cell>) line: 306     
         FrontController.generateGlider(PrintWriter) line: 240     
    thank you
    /michael
    http://www.eclipselink.org

  • Cannot enable root user

    When I set up my user account last year when I got this computer, I am pretty sure I remember a shortname being filled in or suggested to me, and it had an uppercase character for its first letter. So, my short name is "Name" -- except, you know, instead of "Name" it's my first name.
    Anyway, I haven't had any issues until I installed 1Password. I'm having some trouble keeping it in sync, and ran a troubleshooting app as part of their guidance and I see that they say an issue is that my shortname contains an uppercase letter, when in fact it should be all lowercase.
    I find mixed reviews online of whether all lowercase in the short name is still a thing—I've found a few places that say uppercase letters were allowed in 10.6.8, but others say that it should be all lowercase and I need to change my shortname.
    I'd really rather not change it, but just to see how I would do it if I ended up having to, I checked out these instructions http://support.apple.com/kb/HT1428. I got hung up on enabling the root user, though, because I'm not able to select "Enable root user" from the edit menu. It's always grayed out.
    I then found this Apple doc on enabling the root user in Mountain Lion: http://support.apple.com/kb/PH11331?viewlocale=en_US but it's nothing different. "Enable root user" is still always grayed out in the edit menu.
    So... Is there no way I can enable the root user? I'm running 10.8.

    FWIW, enabling the root user account to change a user's shortname is taking a sledgehammer to put a tack in a wall to hang a picture. Better is to follow this:
    https://discussions.apple.com/docs/DOC-3872.
    I've not enabled the root user account since installing OS X in 2002 and I use the Terminal and the CLI routinely.

  • Can't enable root access in Lion 10.7.2

    Hi all,
    I have read this Apple article on enabling root in Lion. It doesn't work for me.
    I did a fresh install of Lion 10.7.2 to a formatted drive from a USB thumbdrive. I ran Software Update until there were no more updates.
    When I open the "Directory Utility", the padlock shows open, and when I click on it, I am not prompted to authenticate, as the article suggests. In the Edit menu, Enable Root User is grayed out.
    Any ideas how I do this?
    Thanks.
    Mac Pro 2 x 2.66GHz Quad Core Xeon, 12GB RAM

    flyboym535i wrote:
    To etresoft: Don't you need to enable root access before you can sudo to root in the Terminal? That's what started me down this path in the first place – because I couldn't sudo to root in Terminal. Then I remembered I needed to enable root access.
    No, you do not. I think you probably just weren't using sudo correctly. Normally, you just do "sudo /path/to/some/executable <program arguments>". If you are a real daredevil, you can just do "sudo bash" and give yourself a root shell.
    I actually submitted an enhancement request to Apple to suggest they improve the root user process. Even when it works (and it doesn't half the time in Lion), it is horribly convoluted. I would prefer it if Lion had something like "Run as" in Windows. Apple's response to my enhancement request was "Why don't you just use sudo?". So I tried again to explain it.
    Until there are significant enhancements in this area, "sudo" is the way to go.

  • How to login as root in mountain lion?

    i've already enabled the root function in directory utility.
    i CANT find how to login as root user. in login window there's just the one for my admin account.
    please help, i want to change the name of my home folder..
    [p/s: i've done this previously in snow leopard]

    Well, i have the same problem, and the solution you suggest kinda works...
    If i log out and try to login again then it works as expected.
    Meaning that if the setting is set at "Name and password" you get 2 empty fields
    and if it's set to "List of users" (with root user enabled) i get 2 circles (one with my user name and a second one marked as other, so i can log in as root).
    But this only happens when i log out and try to log in again.
    If i restart the Mac or shut it down and open it again, then this setting is ignored and all i am getting is one circle with my main account to log on!!!
    Could this be a ML bug?
    I even upgraded to 10.8.1 today, but that didn't fix things!
    Any ideas?
    Thanks.

  • How to prompt for root/sudo credentials with Gnome

    With other distros like Ubuntu, Gnome prompts for root/sudo authentication whenever applications like Gnome services are run from the Desktop menu.  How do you enable that feature in Arch?  I have tried different variations of gksude -u root, gksudo -S....  Nothing seems to work.
    Thanks

    msmail000 wrote:I have gksu installed...  my user id is in the sudoers file "username ALL=(ALL) ALL".  I execute gksu services-admin.  I am prompted for the password.  The Services window appears and the Unlock button is active.  When I depress the Unlock button, nothing happens, all of the available services remain unselectible.
    Yeah, that's a known issue with the system tools. No bug report filed for it, though, I don't think. The buttons/services should work properly, though, if you were to try through a regular user and then unlocking after that.

  • What makes the "Enable Root User" option available?

    I've read the articles on enabling and disabling the root user.  They all get to the Open Directory Utility where you need to "Choose Edit > Enable Root User" .  I can successfully do this on MacBook Air with Lion, but not my Mini with Mavericks because Enable root User is not enables (grey).  WhatdoI need to do to enable it, or another way, what would cause it to be disabled?

    cdefromtacoma wrote:
    Never mind.  I have decades experience with Unix/Linux etc. (just not so much with OS X), and in this instance I know I need root.  Besides, if not this time, then sometime soon.  Thanks for your efforts though.
    All the more reason for my question. You can always get root via sudo. If you didn't have that experience with UNIX then it might be a more difficult question of explaining how to use the Terminal. The only reason to enable the root user is to perform an Aqua login as root. All of the system-level operations are far more easily done in the Terminal than in the UI. Plus, nobody, including Apple, ever enables root so there is no telling what performing UI actions as root will do. I'm not being pedantic here. I am just repeating what I hear from Apple. I filed a bug report on the buggy "enable root" operation and Apple's response was literally "why not just use sudo?".

  • How do I enable Port 80?

    When I do a port scan of my server with Network Utility, port 80 doesn't show up. I can enable and disable port 80 on a client with Personal Web Sharing, but how do I enable it (what could possibly be disabling it?) under Mac OS Server 10.4.7?
    The client and server are behind the same hardware firewall.

    That's the problem. With no sites, Apache is not
    listening to any interface... it's quite interesting
    how Apache even started without any sites.
    So, maybe you should have started out with, "Help,
    cannot create any websites using ServerAdmin". What
    are the steps you went through and what other
    symptoms (Error messages, green/red lights, greyed
    out options, etc.) are there?
    Thanks for your interest, Celia. I started an earlier topic in the Web Services forum, "Can't see web pages on server, not even from the server", to which you posted a couple of times, but with 15 posts (none since Sept. 22) it seemed unmanageable.
    So I zeroed in on one of my problems, hoping (in vain, apparently) to avoid chicken/egg issues.
    Summary of my situation:
    (1) when I try to add a site Apache gets SIGUSR1 and restarts
    (2) When I do a Port Scan port 80 doesn't show up
    (3) console.log contains
    Server Admin[12080] * Assertion failure in -[NSTextFieldCell _objectValue:forString:errorDescription:], AppKit.subproj/NSCell.m:1298
    (4) system.log contains
    servermgrd: servermgr_dns: no name available via DNS for 10.10.1.40
    servermgrd: servermgr_dns: no hostname set and unable to detect via DNS, services may not function properly - use changeip to repair
    (5) configtest shows 4 'already added' warnings but syntax OK
    (6) The sites dir contains
    -rw-r--r-- 1 root wheel 1041 Mar 20 2005 0000any_80.conf.default
    -rw-r--r-- 1 root wheel 533 Sep 21 16:47 virtualhostglobal.conf
    -rw-r--r-- 1 root wheel 502 Mar 20 2005 virtualhostglobal.conf.default
    The first file contains all finds of stuff but no Listen. The middle one contains only comments. The last, default one includes "Listen *:16080".
    All I'm trying to do is get intranet access to the server so I can use a Mantis (needs MySQL & php) bug database.

  • How to take square root of it

    Hi Folks!
    Can anybody tell me how to take square root of this value "bi"?
    BigInteger bi = BigInteger.valueOf(2000000000);
    Thanks in advance.

    I wrote this simple sqrt function for BigInteger.
    * Returns the largest BigInteger, n, such that bigInt>=n*n.
    * If round is true, the function returns n+1 if it is closer to actual square root.
    * @param round if true, attempt to find a closer value by rounding up.
    * @return <tt>round ? round(sqrt(bigInt)) : floor(sqrt(bigInt))</tt>
    public static BigInteger sqrt(BigInteger bigInt, boolean round){
         BigInteger op = bigInt;
         BigInteger res = BigInteger.ZERO;
         BigInteger tmp;
         int shift = bigInt.bitLength()-1;     
         shift -= shift&1;
         // set one to highest power of 4 <= bigInt
         BigInteger one = BigInteger.ONE.shiftLeft(shift);
         while(one.signum()>0){
              tmp = res.add(one);
              if(op.compareTo(tmp)>=0){
                   op = op.subtract(tmp);
                   res = res.add(one.shiftLeft(1));
              res = res.shiftRight(1);
              one = one.shiftRight(2);
         if(round&&op.signum()!=0){
              op = bigInt.subtract(res.pow(2));
              if(op.compareTo(res)>0){
                   res = res.add(BigInteger.ONE);
         return res;
    }

Maybe you are looking for

  • How to put a String(date) into Date (java.util.date)??

    hi there I got a GUI here and I need to read some JMaskedTextFields from it. I put them all into Strings. Now I need to pass them to the search-function, but one of the search arguments is not string. Its Date. I tried to initialize Date with Date(St

  • EXPDP fails with ORA-39125: Worker unexpected fatal error in KUPW $

    Hi Friends, Oracle 10.2.0.4.0 on Sun OS Im trying to do metadata_only export using EXPDP Facing the below error ORA-39125: Worker unexpected fatal error in KUPW $ WORKER.UNLOAD_METADATA while calling DBMS_METADATA.FETCH_XML_CLOB [] ORA-31642: The fol

  • How to Print Html Document (more than one page)

    I've a problem with printing my html page. I can print one page of html file, But my document is longer than one page. and i can't print it. who know how to print . Please Reply

  • Partioning in Oracle 10g

    I have heard of the partioning feature in 10g database which is not there in 9i. Can, i know the advantages of this and how it can help. I hope, my question is clear. Please, help in solving the doubt. regards

  • PowerBI & Azure Stream Analytics jobs login issue

    Hello team, We are working as early-adopter partner for Azure Stream Analytics along with azure IoT suite, we recently have got 'PowerBI' services enabled as 'output' connector of stream analytics job on our corporate subscription & accessing our sam