Can I go directly to "root" in the Unix shell?

I've been doing a lot of stuff lately in the Unix shell and a lot of it requires
running as root.  I find that I can't "su" directly to root, but rather have
to su to an admin account and then su to root, which gets a little
annoying.
Is there any way I can change this (besides making my account
into an admin account, which the local security people frown
on)?
Thanks,
Eric

Assuming you are logged in as the Mac OS X admin, then you just enter the 'sudo' command and when prompted for a password, you enter YOUR password.
id -a
# vs
sudo id -a
sudo chown $USER:staff /some/path/to/a/file
sudo nano /etc/hosts
sudo command options and arguments you want run as root
as an example.

Similar Messages

  • TS4532 My iPhone V will not connect to a Microsoft Exchange server. It says that the User Name or Password are incorrect even though they're not and I can log on directly to Exchange using the web browser. The connection worked until IOS 6.1.2 was Install

    My iPhone V will not connect to a Microsoft Exchange server. It says that the User Name or Password are incorrect even though they're not and I can log on directly to Exchange with the same parameters using the web browser.
    I bought the phone when it came out last October. The connection did not work at first, then started without warning in December. It worked perfectly for 2 months then stopped again when IOS 6.1.2 was Installed.
    Help please!

    I have forwarded these questions about the version of Exchange server that is being used and whether Microsoft host the mai themselves to the IT Dept but I will not get a reply from them until tomorrow.
    In the meantime I have also tried:
    Deleting and re-creating the account AGAIN!
    And re-setting the phone (recommended as a solution to a similar problem with an iPad in another forum.
    But please remember that:
    The phone would not connect for 2 months after I bought it
    Then started working unexpectedly in December
    Then stopped working again when IOS 6.1.2. was installed
    Also why am I the only person affected by this when colleagues with iPhone 3s and 4s who use the same mail system are not (I am still trying to find one with an iPhone V to see if their's works).
    Like I said I think that there must be a fault, either with my own phone or with iPhone Vs in general.

  • How to get the Unix shell promp in OS X

    How do I get the Unix shell prompt or its equivalent in OS X?

    Still could not find it. I install the package:
    mysql-5.5.2-m2-osx10.6-x86
    Here is what the read me file says:
    2.4.10 Installing MySQL on Mac OS X
    You can install MySQL on Mac OS X 10.3.x (`Panther') or newer using a
    Mac OS X binary package in PKG format instead of the binary tarball
    distribution. Please note that older versions of Mac OS X (for example,
    10.1.x or 10.2.x) are not supported by this package.

  • Looking for a bluetooth headphone for my Macbook Air and Ipad Mini, I am not looking for a headphone that needs a transmitter to be connected to the source rather a headphone that can be connected directly via bluetooth to the source device

    I am desperately looking for a bluetooth headphone that would be compatible to my Macbook air and Ipad mini both. I am more of looking for a headphone that does not need a transmitter device to be connected to the source (in this case Macbook Air and Ipad Mini) and headphone acting as a receiver, rather need a headphone that would be connected directly via bluetooth to the source, it would be great if multiple apple devices be connected simultaneously. Please suggest some good headphones.

    Hey sorry for the late reply, I was busy to figure out alternatives as harman kardon was a difficult affair to find and acquire, but the good news is I managed to get hold of alternative.
    Sony I assume recently launched a Bluetooth headphone DR-BTN200 which is compatible to my MacBook Air , iPad mini and android phone galaxy s2 with ease, the sound quality is pretty good as compared to other brands of Bluetooth headphones I checked compatible or incompatible to apple devices alike, this is definitely what I was looking for, costed me 7990 INR, this is highly recommended for ppl who are confused, I carried my devices to the store and checked before I bought a pair and pretty much happy,
    The best part of this is its battery backup, I have used this hours for 3-5 days but this has not drain even then, but I do keep this charging once in 2-3 days just to keep this ready otherwise it does not even ask for it neither the quality of sound drops after 2-3 days of use.
    This is over the ear headphone which is very soft but it's get sweaty around the ear I guess that's bound to happen.
    Do get back to me for any other details, would be glad to share with all :)

  • How can i call a Stored Procedure procedure from Unix shell script

    Hi All,
    I want to call a Strored PL-SQL Procedure through Unix shell script.
    Can any body help me with this.
    Regards,
    Saurabh

    I prefer a seperate script like the other poster mentioned. However, most shells can use a 'here' document as well ...
    sqlplus uid/pwd <<END
    exec myproc
    exit
    ENDRichard

  • Fscript, fscripter and the unix shell

    I am starting to play with Fscript and have yet to decide if I hate it. One thing I would like to be able to do is embed Fscripts within unix shell scripts. Anyone know how to do this?
    I can write an fscript script invoking with
    #!/usr/local/bin/fscripter
    and it runs ok, but the example I am using, a currency converter, won't take input in its dialog boxes. (It works fine from Fscript's own interpreter). So maybe this idea isn't a good one to pursue, but I have been trying to embed fscript within a unix shell script using the usual Here Document formalism, and it doesn't work, at least in my hands.
    Anyone have this working?

    Well? Out with it!

  • Fle import the unix shell script

    hi all
    I want to develop unix shell script & cron job to read ftp file and call an oracle procedure to import the data in an oracle database
    can any one tell me how to go about it ?
    also does any one have some documentation related to the topic
    plzzz help me
    mandar

    Hi,
    I want to develop unix shell script & cron job to read ftp file and call
    an oracle procedure to import the data in an oracle databaseYou can
    1/ use ftp to get the file to Oracle Instance host then call a Proc/Package that'll parse the file.
    2/ write/find on google a FTP package using UTL_TCP then create a procedure using the package to open the ftp file and parse it.
    You don't give much details on what the actual aim is, si I can't be more specific.
    can any one tell me how to go about it ?There might be other possibilities, describe what you want to achieve globally and we'll give you more advices.
    also does any one have some documentation related to the topicTahiti: http://tahiti.oracle.com
    maybe AskTom: http://asktom.oracle.com
    Regards,
    Yoann.

  • HT201240 I am trying to reset my password and the only user I can select is system administrator (root) which the above article tells me not to select?

    My system will not recognize my password so I cannot download new software in order to move MobileMe to iCloud. 

    Hello, we have some corruption so first...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    If that still doesn't help...
    Reset OS X Password Without an OS X CD...
    http://theappleblog.com/2008/06/22/reset-os-x-password-without-an-os-x-cd/
    It'll boot like a newly setup Mac, but all your stuff should still be there once filling out the stuff.

  • How do I add a "file folder" to my TC so that I can save files directly to the TC?

    I am trying to figure out how I can add a "File Folder" to my TC so that I can save files directly to it? The only folder it displays is "Data" which is where my bac ups save...

    Double click on the "Data" folder in the Finder under the SHARED heading, and then click the gear icon at the top of the window and select New Folder.
    You can name this folder anything you wish and also create as many folders as you wish.
    If you are also using the Time Capsule drive for Time Machine backups, it is not really recommended that you "mix" regular files with Time Machine backups because there will be a struggle for space on the drive at some point.
    If you have plenty of free space on the Time Capsule drive, you may be OK with keeping a portion dedicated for regular files.

  • Can not copy any file or empty the trash

    Hello,
    I'm using a Macbook (white) with OSX 10.6.4 and am having an extremely annoying problem which has three symptoms:
    1. I *can not empty the trash* (safely or not) at all.
    2. I *can not copy any file*, anywhere.
    3. I *can not move anything to the "Applications"* folder.
    I try restarting the computer, repairing the permissions, running the latest version of Onyx and so on, but nothing works. I always get the following error message (when copying a file or emptying the trash)
    "The operation can't be completed because you don't have the permission to access some of the items".
    And this even though I repaired the permissions three times today.
    To be honest, this makes my Mac pretty useless, and is very frustrating.
    Can anybody help? I've browsed a lot of other threads about this, tried everything, but to no avail.
    Come on, this is my first Mac, don't tell me I have to reinstall the OS from zero, Windows-style.

    Those are the normal permissions but if you are logged in as admin, hit the unlock button and enter your password they should no longer be greyed out.
    You can try chmoding them from root through the terminal if you are up for it. I'd also try booting up in SafeMode and seeing if that allows access.

  • Can i use java mail APIs to read Unix mail

    hi
    can i use java mail APIs to read Unix mail?
    Unix has "mail" command which can be used to access mails on the Unix system.
    is it possible to execute mail & access unix mails remotely using POP/IMAP
    thanks in advance

    There are JavaMail providers that allow you to access the Unix mail spool files directly. Alternatively the standard JavaMail API can access a POP or IMAP server, if one is installed.

  • How do i point to the Unix category?

    All I can do is point to OS X Technologies forum/discussion/community or whatever these are called, but can't direct anyone straight to the Unix or AppleScript category. This needs fixing or some direction on how to do this.

    baltwo wrote:
    All I can do is point to OS X Technologies forum/discussion/community or whatever these are called, but can't direct anyone straight to the Unix or AppleScript category. This needs fixing or some direction on how to do this.
    Hi baltwo-  this is like the blind leading the blind. You have to click on the category box:
    and you end up with this:
    https://discussions.apple.com/community/mac_os/mac_os_x_technologies?view=all#/? tagSet=1048

  • How can i pass parameter values from html to a shell script

    Hi Guys...
    I had a requirement where i need to execute a sql statement and print the output in HTML page. This report has parameters to enter. So i created a HTML form which accepts parameters. When the submit button is pressed, the action tag in the form invokes unix shell script file. It will open sqlplus and run the sql script file .sql and print the output in the HTML page.
    sql script contains the query and some set options which prints the output in HTML page. Like "SET MARKUP HTML ON"... The query has some parameters like "select * from emp where empno = &&empnumber. I will use the same name "empnumber" while created the HTML parameter form like " <input type = "text" name="empnumber" size="10" align="left">.
    user sees this parameter form and enters some value in to that empno text box.
    My question is how can i catch these parameter values in a shell script and pass it to the sql script to execute it.
    Help Appreciated
    Thanx

    This is a A Bad Idea (tm). This type of CGI processing is old and were (and still is) full of security holes. Very easy to inject stuff (Unix commands and SQL) into it.. To get those parameters into SQL*Plus requires using Unix shell commands to process it - and something like a backquote allows all kinds of nasty stuff to be injected. The Unix shell was never designed to be used as a secure CGI environment.
    There are far better and far superior alternatives. Perl (with Perl_DBI) and PHP (using Zend Core for Oracle) come to mind as web scripting languages.
    Even easier is using HTMLDB. Very few moving parts. Is free. Supports Oracle 9.2 and 10G.

  • Can we run a stored proc script from Unix console?

    Hello all:
    One of my colleagues insists that she used to run a stored proc file, say, abc.proc from a Unix console, with some command. I suspect the "command" is actually a script that invokes sqlplus commands. I never knew a stored proc script can be ran by any built-in Unix command, other than that in sql*plus console.
    Anyone can prove me wrong?
    Thanks,
    Johnny

    Hi Johnny,
    Unix shell doesn't have any means of compiling and/or executing PL/SQL code. You need a client (a driver) to make database calls, like sqlplus. So I think your assumption is correct.
    Best regards,
    Nikolay

  • Can i call unix shell script from B2B callout.

    Hi,
    We had a requirement to invoke a unix shell script from B2B callout implemented class. Here is the code in implementation class:
    public void execute(CalloutContext context,List input,List output)
    throws CalloutDomainException, CalloutSystemException {
    try {
    CalloutMessage cmIn = (CalloutMessage)input.get(0);
    FileOutputStream fos = null;
    String inputFile = "/home/orasoad/digitalsign/input/test.txt";
    String outputFile = "/home/orasoad/digitalsign/output/test.txt.gpg";
    File outFile = new File(inputFile);
    String str =cmIn.getBodyAsString();
    fos = new FileOutputStream(outFile);
    Writer out = new OutputStreamWriter(fos);
    out.write(str);
    out.close();
    String shellFile = "/home/orasoad/digitalsign/dg.sh";
    String cmd[] = new String[] { shellFile, inputFile, outputFile };
    Runtime rt = Runtime.getRuntime();
    Process pr = rt.exec(cmd);
    int i = pr.waitFor();
    BufferedReader br = new BufferedReader(new InputStreamReader(pr.getInputStream()));
    StringBuffer sb = new StringBuffer();
    String line;
    while ((line = br.readLine()) != null) {              
    sb.append(line);
    CalloutMessage cmOut = new CalloutMessage(sb.toString());
    output.add(cmOut);
    } catch (Exception e) {
    throw new CalloutDomainException(e);
    We were able to execute the unix shell script from standalone java class with same code. But some how it is not working as expected while invoking the B2B java callout.
    Is it possible to invoke unix shell script from B2B callout?
    Please give inputs.
    Regards,

    Though it's not a good idea to invoke shell scripts from java callout but technically it will work.
    But some how it is not working as expected while invoking the B2B java callout.What is not working as expected? Any error in the log (server-diagnostic.log or server.out)?
    Regards,
    Anuj

Maybe you are looking for

  • Getting OPP LOG Error for XML Publisher report

    Hi Experts                            We are facing warning message for Xml Publisher report  please advise how can we avoid this warning message. {code} Post-processing of request 12345678 failed at <sysdate> with the error message: The Output Post-

  • Can I use my airport express to extend a wireless network with a non-apple router?

    I have been trying to extend my wireless network in my house.  Right now I have a dsl modem/router provided by Century Link and an older AirPort express (not sure how old but it uses AirPort utility v5.6).  I want to be able to share my printer and u

  • Exporting files out of LR3?

    Has anyone had problems exporting files out of LR3? This was very simple in LR2. I receive orders via email, print them out, and then pull up the selected images 1 or 3 or 50 @ a time. LR3 is not exporting over 1 or 2 images and then it freezes up.

  • Facetime problem!!!!! Help!!!! Jeje : (

    Hi, i just bought yesterday an iphone 4 and i have been trying since then facetime but I just cant make it work. Im trying the iphone with my Imac 10.6.7, 2.66 Ghx Intel COre 2 Duo, i noticed that i needed the app for the mac so I bought it. Since th

  • Is OAF dead in 2/3 years?

    I've been studying OAF for the last year on my own, thinking many more modules would be migrated to OAF. But I do not know if OAF will be replaced by other tools ( Peoplesoft tools ? ) in the medium future with the project FUSION. Has anyone news abo