How to upde userid to uid=0 using command line?

Hi all,
I made a new user "sysadmin" by typing at root command line:
# useradd sysadmin (all default profile values)
What is the command (line) to update its UID to "0"?
Thanks you very much in advance.
Ms KK

In general, having multiple accounts with the same UID is a bad idea. To have
multiple "root" accounts is very, very bad idea.
If you need an ordinary mortal user to be able to execute privileged commands,
set up the sudo(1) facility. This will let you grant permission with a fine
level of control about exactly which program or command is being used. As a
bonus, you will get an audit trail of who did what as whom.
The great thing about sudo(1) is that you can grant root privilege without
having to give out root's password.
Now, assume you make duplicate "root" accounts. You get offered a better job
and leave. The new sysadmin will need careful briefing before doing anything.
This will create a major maintainability issue long term.
If you want another root user for disaster recovery or losing the password,
there are better alternatives such as:
-- Reboot the system using rescue mode from the installation disks.
-- Boot into single-user mode by interrupting the GRUB install sequence and appending "s" to the kernel command line.
-- Boot into an interactive shell by appending the "init=/bin/bash" clause using the same technique.
These are some of the known, common, best practice methods of handling this
situation. A custom solution here could be quite dangerous and hard to maintain
in the long run.
Please don't.

Similar Messages

  • How can I create a NetBoot image using command line tools?

    Is it possible to create a NetBoot image entirely using command line tools?
    (That is, without using the SystemImageUtility)
    If so, are there reasonable instructions posted somewhere?
    I don't believe I can use SystemImageUtility with my current setup,
    but I would be happy to hear how I could:
    I have a set of Xserve clusternodes but without optical drives or video cards.
    One node acts as the head, running DHCP, DNS, OpenDirectory, Xgrid.
    They are wired to a gigabit switch.
    I have a PowerBook connected on the subnet which has ServerAdmin Tools installed.
    I don't think when I run SystemImageUtility on my PowerBook that I can successfully image one of the clusternodes disks over the network.
    I have tried to start one node in target(Firewire) mode, connect it via Firewire
    to the head node, and run hdiutil from the head node to make a complete disk image of the clusternode's drive.
    But a NetBoot image requires the whole nbi file, right?
    Could I then use copy this disk image to my PowerBook and use SystemImageUtility on my PowerBook to create a NetBoot image from it?
    I really have tried to read the PDFs, but I found the section on System Imaging in the Command Line Reference rather unhelpful.
    Thanks for anyones help.
    dmaus
      Mac OS X (10.4.4)  

    To create a NetBoot image, you could just put the cluster node in target mode and attach it to your PowerBook. Then use SIU to create the NetBoot image.
    If you're trying to create a backup image of the disk, use hdiutil, or put in in target mode and create the image with Disk Utility.

  • How to Load an app to iPad using command line

    Hello,
    I am trying to build an iOS app and load it to an iPad where I want to run an automated test on it from command line.  I do not wish to use Fruitstrap or any other third party tool/code as I only want to use native apple code.
    xcodebuild -verbose -project iOS_Calc.xcodeproj -configuration Release -sdk iphoneos6.1 -arch armv7 -target iOS_Calc clean build
    xcrun -sdk "iphoneos" PackageApplication -v "$project_dir/build/Calc.app" -o "$project_dir/build/Calc.ipa" --sign "$provisioning_profile" --embed "$project_dir/$mobileprovision"
    Above is the script I have so far to build the app, but I dont know how to load it to an iPad via command line. Does anyone know how to load the .app to iPad device?

    I'm also interested. Not only load but also run.

  • How to open url in acrobat reader using command line

    Hi,
    I need to open file from url using command line, but I'm still getting some error (wrong filename).
    I've tried for example this command:
    AcroRd32.exe http://www.adobe.com/devnet/acrobat/pdfs/pdf_open_parameters.pdf
    Can anyone help me and tell me what's wrong?

    You can't use a URL as parameter for AcroRd32.exe.

  • How to run multiple java files concurrently using command line?

    Hi,
    I have to write a script to run multiple java files and c files concurrently. Say, A and C are java files and B is another binary executable file, I have to make sure they are run in the order A-B-C, then I was trying to run by using
    java A & ./B & java C
    But it turned out that B could run before A started... Is there any way that I can ensure that A runs before B, and B runs before C by using the command line?
    Thanks a lot.

    GKY wrote:
    Sorry, I didn't make my question clear enough...
    A has to give some output files that B needs to get started,Then B can start at any time--even before A--and just wait for those files to be written. For instance, A could write to a temp file, then rename it to the real name. However, if there are multiple files, and they all have to exist, even this won't necessarily work. There are other approaches that will though.
    although writing the output takes very short time,Depends on when the OS decides to give A CPU time, what else is going on on that disk controller and/or network, etc.
    B could still run before A finishes the writing, As it can if you sleep for 1, or 10, or 1,000,000 seconds before starting B.
    if B can't find the info it wants, it fails to move on. That's why I need to make sure A starts before B.No, you need to make sure A's data is there before B tries to use that data.
    Edited by: jverd on Jul 29, 2008 1:06 PM

  • How to extend C:\ Drive from D:\ using Command line.

    Hi Friend,
    Need your help for extend 30 GB from D:\ to C:\ Drive using Diskpart cmd.
    My HDD size : 500,
    C:\ Drive : 70 GB (Want round this drive as 100 GB)
    D:\ Drive : 394 GB (Want to increase form here)
    After rounding C:\ as 100 GB want to create D:\ drive from unallocated volume and need to do this migration in Diskpart or in BAT Command line.
    -Thanks

    It is not possible to take space from one volume and add it to another volume on the same drive by using diskpart.cmd or any other Microsoft built in tool.
    There are some third party tools that can achieve the task you describe.
    Anyways, the first step is to take backup of your disk, especially volume D:
    After backing up your data, you could perform following steps.
    Using diskpart, remove partition D:
    Using diskpart, extend volume C: (extend size=30000)
    Using diskpart create partition in the remaining space (create partition primary)
    Assign drive letter D: to the partition created in previous step
    Format volume d:
    Restore data from backup to volume D:

  • How to duplicate a target and add resources in xcode using command line?

    I am trying to use command line tools to create, add resources, build, archive and export to ipa in xcode. I could do the Build, Archive and Exporting to IPA through the command line tools(xcodebuild). But I also wanted to duplicate the target in the same project,add a new Info.plist to the duplicated target resource through command line itself. How to do it? I could not find any valuable answers by Googling. I could not find any proper documentation also in Apple Sites.
    Is there any tools that can be used to perform these? I don't want to use the UI. Please, help me out.

    The Mac App Store is not appropriate for command line tools. You can use any language you want.

  • How to Create Test Sequence Document in HTML using command line

    How to Create Test Sequence Document  in HTML using command line
    I have lot of sequences and I want to create Test Sequence Documentation in HTML format using Command Line automatically, is there a way to automate this task using .bat file or using   C#  .Net

    If you aren't able to figure out how to call a C++ DLL in .net then there may be another option.  Unfortunately I don't know how to do this off the top of my head and I don't have an example.
    The other option would be to change docgen.seq a little bit to the dialog doesn't display and you just hardcode the options.  Then you can use a command line to call testexec.exe: http://zone.ni.com/reference/en-XX/help/370052K-01/tsfundamentals/infotopics/startup_opt/
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • How to call a ODI Job using Command line?

    Hello All,
    Please help me on this..
    How to call an ODI Job using Command line?
    Thanks
    Ravikiran

    Generate a scenario of your package. Then go to <ODI_HOME>/oracledi/agent/bin in command prompt and invoke startscen command .
    startcmd.sh OdiStartScen -SCEN_NAME=scn_load_data -SCEN_VERSION=001 -CONTEXT=GLOBAL -AGENT_CODE=odiSchedAgent001
    Bhabani
    http://dwteam.in

  • How to print a specific page from a given PDF document, using command line, please?

    Hello,
    I need your advise, please. My customer requires to print a specfic page from a pdf document they receive, using command line or 3rd party solution.
    Anything you can advise, please? I have seen AcroRD32.exe options, but can only print the whole document.
    Kind Regards

    Not sure if there are any examples. The Acrobat SDK is a must, but it is best treated as documentation to study rather than examples to copy. The examples only illustrate a tiny fraction of the capabiliies.
    (One other note: the solution must involve the client owning Acrobat; Acrobat is not for server use).

  • How to compile and run java files on a mac using command line?

    can someone tell me or link me to some article on how to compile and run java files from command line on a mac? I have mac OS X leopard

    What do you mean by "where to put them" ? What do you want to put anywhere ?
    Have you read Peter's comment in brackets ? Perhaps you have a classpath problem ?
    Edited by: Michael_Knight on Aug 31, 2008 4:23 AM

  • How to use command line with acrobat to extract page(s) from pdf file?

    I have adobe acrobat, and have a pdf file with over 500 pages. I need to extract small chunks of pages from it as seperate pdf files. I was hoping I could use command line interface to do this faster.
    Something like:
    acrobat src des start end
    so for example
    adobe file.pdf my_folder 3 5
    Is this possible? There are many chunks and I don't want to manually do it for every chunk. Command line would be much easier...
    Thanks

    I can't find any programs... sorry.
    Can you create one for me please.
    It should at least have these 5 arguments: (well the first one is not neccessary since were not using acrobat anymore...)
    [program] [src path/src file] [destination path/file name] [start page (inclusive)] [end page (inclusive)]
    for example:
    acrobat ./my_file.pdf ./my_folder/chunk1.pdf 3 5
    if start page == end page, then it only extracts that one page.
    So this way I can just stack these comands on a .bat file or something (maybe like 100 commands), then run the bat file, and it will create all the files.
    Thanks for doing this, it is appreciated.

  • How to purge data cache table using command line

    Hi:
    Is there a way to purge the data cache table using command line?
    thanks!

    Thanks, Mike.
    I'm thinking about the ldconsole provided with ALDSP.
    The ldconsole has a link for purging the cache. Is there anything I can leverage from there? Is it a JMX component that I can call?

  • How to test ODI Agent - using command line / scripts ?

    We can test ODI scheduler Agent from Topology manager, is there a way to test it using command line options / scripts ?

    Go to <ODI_HOME>/oracledi/bin in command prompt and invoke startscen command with teh below parameters.
    Edited by: Guru Sankar on Feb 28, 2011 4:19 PM

  • How to create user in workspace using command line with Internal APEX

    Hi fellows,
    I'm newbie with APEX and my i try doing something different. I need to build one application in Internal for create users in another workspaces. So, for do this, need use command line and PL/SQL code.
    I know exists a CREATE_USER procedure. But, this procedure just create a user in Internal, not in workspace, like i want.
    Its possible? Someone can help me?
    Example of create_user procedure:
    BEGIN
      APEX_UTIL.CREATE_USER(
         p_user_name => 'NEWUSER2',
         p_first_name => 'FRANK',
         p_last_name => 'SMITH',
         p_description => 'Description...',
         p_email_address => '[email protected]',
         p_web_password => 'password',
         p_developer_privs => 'ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL',
         p_default_schema => 'MY_SCHEMA',
         p_allow_access_to_schemas => 'MY_SCHEMA2',
         p_change_password_on_first_use => 'N',
         p_attribute_01 => '123 456 7890');
    END;
    Thank you.

    Did you try it like this?
    DECLARE
       l_workspace_id      number;
    BEGIN
        l_workspace_id := apex_util.find_security_group_id (p_workspace => 'MY_WORKSPACE_NAME');
        apex_util.set_security_group_id (p_security_group_id => l_workspace_id);
      APEX_UTIL.CREATE_USER(
         p_user_name => 'NEWUSER2',
         p_first_name => 'FRANK',
         p_last_name => 'SMITH',
         p_description => 'Description...',
         p_email_address => '[email protected]',
         p_web_password => 'password',
         p_developer_privs => 'ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL',
         p_default_schema => 'MY_SCHEMA',
         p_allow_access_to_schemas => 'MY_SCHEMA2',
         p_change_password_on_first_use => 'N',
         p_attribute_01 => '123 456 7890');
    END;

Maybe you are looking for

  • Emails in Mail OS X

    So here's the thing. i erased a few contacts from my address book and when i start typing the first few letters of the person i want to email, i notice that the person whose information i erased still appears in the To: box. This is really annoying.

  • Create destinations for pdf file

    I would like to create in Frame a destination that appears in the pdf as a destination, I would think this would work: but in the pdf file, it doesn't appear, is there another way? Are my settings correct?

  • Safari won't launch anymore

    Tonight, after having used Safari as my primary browser since its introduction, it suddenly quit on me. Not a major disaster - software does it all the time. But this time, I can't get it to start back up. Whenever I click the Dock icon, it will take

  • Unbelievably bad BT service

    I reported a line fault in October, which was subsequently fixed by an Engineer's visit. The fault was to the line outside the house, (before the master socket).  Broadband fault VOL051-*************. I have since migrated to another supplier after t

  • Backup time when updating iPhone to IOS 5?

    How long did it take for your iPhone/ iPads to finish the backup proccess??