Is this sudo command safe?

Is this command safe and what does it actually do?
sudo update_dyld_shared_cache -force
Thanks!
Julius

Click here for information.
(104278)

Similar Messages

  • Sudo Command with installation

    Hi,
    I am trying to install a software called Fullprof suite. Upon downloading, I have to follow the directions listed here:
    http://www.ill.eu/sites/fullprof/php/downloads.html
    I'm supposed to use the sudo command in terminal, which may lead to data loss. I'm pretty new to this sort of thing, so I would like to confirm that the text I am entering is safe, and only allows installation of the program:
    sudo ln -s /Applications/Darwin/openmotif-2.2.3-universal /usr/OpenMotif
    I am running on MacBook (2008), 10.5.8.
    Any help would be appreciated. I tried running this program on our pc and now that computer doesn't start....

    1. Revokes the permissions the first command granted so that nothing else can take advantage of them.
    2. Because it's making changes to system-level folders. This is the same reason why most of Apple's software updates require an administrator password.
    (77525)

  • Applescript for running sudo commands in terminal

    I'm a newbie when it comes to Applescript and was wondering if someone could help with a basic request. I need to write a small script to do the following:
    1. Launch terminal
    2. Run the 'Sudo -s' command
    3. Enter the administrator password (in plain text)
    and then
    4. run some sudo commands like "sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add administrator"
    I actually WANT the administrator password to be in the script in plain text even though I understand the security risks (I will literally be the only person to ever see the script). I've trawled forums all over but can't seem to find what I am looking for and cannot get it working by patching together the various commands I have found. Thanks in advance for any help you can give!
    Sean

    I've included two examples.  The preferred way & the hacker way.
    with administrator
    It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on.  Here is an example.
        Author: rccharles
        For testing, run in the Script Editor.
          1) Click on the Event Log tab to see the output from the log statement
          2) Click on Run
        For running shell commands see:
        http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
    on run
        -- Write a message into the event log.
        log "  --- Starting on " & ((current date) as string) & " --- "
        --  debug lines
        set unixDesktopPath to POSIX path of "/System/Library/User Template/"
        log "unixDesktopPath = " & unixDesktopPath
        set quotedUnixDesktopPath to quoted form of unixDesktopPath
        log "quoted form is " & quotedUnixDesktopPath
        try
            set fromUnix to do shell script "sudo ls -l  " & quotedUnixDesktopPath with administrator privileges
            display dialog "ls -l of " & quotedUnixDesktopPath & return & fromUnix
        on error errMsg
            log "ls -l error..." & errMsg
        end try
    end run
    This version has an inline password.
    Notice the echo 'password' |
    The single quotes are no accident.
    It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on.  Here is an example.
        Author: rccharles
        For testing, run in the Script Editor.
          1) Click on the Event Log tab to see the output from the log statement
          2) Click on Run
        For running shell commands see:
        http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
    on run
        -- Write a message into the event log.
        log "  --- Starting on " & ((current date) as string) & " --- "
        --  debug lines
        set unixDesktopPath to POSIX path of "/System/Library/User Template/"
        log "unixDesktopPath = " & unixDesktopPath
        set quotedUnixDesktopPath to quoted form of unixDesktopPath
        log "quoted form is " & quotedUnixDesktopPath
        try
            set fromUnix to do shell script "echo 'password' | sudo ls -l  " & quotedUnixDesktopPath
            display dialog "ls -l of " & quotedUnixDesktopPath & return & fromUnix
        on error errMsg
            log "ls -l error..." & errMsg
        end try
    end run

  • Isight not working anymore after a sudo command i put on terminal

    i have not been able to get the smc to work.. but i am almost positive what the problem is that sudo command killall for coremedia command i did..b ecause not my isight built in camera will not work for any application.// this has me freaking out.. please if anyone could guide me through whatever it takes to get this isight camera working that would be a life saver.. i do not believe that it is hard ware because it was working just fine that entire day until i did something in terminal trying to stop the coremedia processes not knowing what they were..

    Post the exact command you entered in terminal.
    You can copy and paste the single command from the output of:
    history

  • Sudo Command Problems

    I tried to use the sudo command in my terminal. The first time i entered the command " sudo chmod a+x install-mac-linux.sh " ,it said the warning and then asked for a password. I tried to type in my password, but nothing would show up on the terminal, like my keyboard was out of batteries. I pressed enter and it asked for the password again and still nothing would show up.I repeated this like 10 times and now is says "chmod: install-mac-linux.sh: No such file or directory " So now I'm lost and would really appreciate some help
    This is what it last said
    Last login: Fri Jun 17 20:19:49 on console
    Clay-Callans-iMac:~ Clay$ sudo chmod a+x install-mac-linux.sh
    Password:
    Sorry, try again.
    Password:
    chmod: install-mac-linux.sh: No such file or directory
    Clay-Callans-iMac:~ Clay$ sudo chmod a+x install-mac-linux.sh
    chmod: install-mac-linux.sh: No such file or directory
    Clay-Callans-iMac:~ Clay$

    Instead of typing the file's name, drag it from the Finder into the open Terminal window.
    (58847)

  • HT4103 my sudo command is not working

    Hello, when i type sudo it show bellow message
    Arifur-Rahmans-MacBook-Pro:~ arif$ sudo
    -bash: sudo: command not found
    when i type ls
    Arifur-Rahmans-MacBook-Pro:~ arif$ ls
    -bash: ls: command not found
    Please help me i am not able to work anythings.

    When I said type
    echo $PATH
    I did mean PATH in ALL CAPITALS.  When working on the Unix side of Mac OS X, as weill all Unix systems upper and lower case do matter.
    But from the error message, I can see that somewhere along the way, mongodb (a database package), and the modification of PATH was done incorrectly.
    If you installed MongoDB, AND if the instructions had to modify your .profile (or perhaps .bash_profile), then either their instructions were wrong, or you missed a step, which explains why you can not enter commands are not found
    PATH is a Unix environment variable that contains a colon separate list of directories where the shell will look for commands when you enter them at the command prompt.
    So your choices are delete the offending .profile (or perhaps .bash_profile) and forget about MongoDB, or if you do need MongoDB, then fix your .profile (or .bash_profile) so it has a properly formed PATH environment variable.
    Fixing this would look like
    /bin/ls -a         # this will show you all the files starting with a period (dot) as in .profile or .bash_profile
    /usr/bin/nano .profile
    now in this text editor use the arrow keys, and the delete key to find and delete offending text, then type in the corrected text.  Nano gives you a menu at the botton of the editor with additional commands.  ^O (Control-O) writes out any changes you made.  ^X (Control-X) exits from Nano.
    You want your PATH variable to look like (REMEMBER UPPER/lowercase is IMPORTANT)  ALSO spaces or nospaces are important.
    export PATH="/usr/local/mongodb-osx-x86_64-1.8.2:$PATH"
    NOTICE there is a colon between the MongoDB directory path, and the $PATH.  The $PATH will append your existing PATH to the end of the new PATH environment variable you are setting up.  The entire PATH string is enclosed in double quotes.  ALSO NOTICE, there is only 1 space between export and PATH.  No spaces anywhere else in the line.
    Again, I used .profile as the most likely file name, HOWEVER, your shell will look for 1 of 3 different initialization files starting with
    .bash_profile
    .bash_login
    .profile
    If will use the first file it finds in the above order and stop looking as soon as it finds a match.  So it is important that you edit the correct file.  The
    /bin/ls -a
    command will tell you want leading period filenames exist in your home directory
    I'll also give you one word of caution.  When playing on the Unix side of Mac OS X, and following instructions you do not understand, it is generally wise to have a very recent full backup of your system.  There are some commands that can make your system unusable should you enter them blindly.
    Message was edited by: BobHarris

  • Sudo Command in Bash Script

    So I created a simple bash script to run on login.....
    one of the commands is the following:
    sudo "something something something"....
    One thing I haven't learned in my years of Unix is how do you get a bash script to run a sudo command without having to enter a password?  I know this is trival, but just a quick 'this is how you do it' would be cool.
    Thanks ahead of time on this really dumb question.

    There's a few ways to do this.  Here's two (pick the method you like):
    Method 1: Using "askpass".
    With this you always do sudo -A command.  The -A argument tells sudo to execute a command that echos the password to stdout.  That command is something you write.  For this explaination let's call the command pw and stick it /usr/local/bin.  So it's full pathname would be /usr/local/bin/pw.
    sudo -A can get the pathname to pw a number of ways.
    1. From the sudoers file.
    Use visudo to add the following line to the sudoers file:
    Defaults:ALL    askpass=/usr/local/bin/pw
    2. Using the SUDO_ASKPASS environment variable.
    export SUDO_ASKPASS=/usr/local/bin/pw
    This might work too (assuming SUDO_ASKPASS has been previously exported):
    SUDO_ASKPASS=/usr/local/bin/pw sudo -A command
    Method 2: Have sudo read the password from stdin
    echo -n password | sudo -S command
    The -S option tells sudo to read the password from stdin so echo pipes it in (without the ending newline).
    The only relatively secure scheme of these two methods is the askpass (-A) method.  At least with that method you have a chance of encrypting/hiding your password down in the command that echoes it to stdout.  The -S method would contain your password explicitly in a script somewhere unless you make other provisions to encrypt/hide it with that technique.

  • Terminal doesn't understand sudo command

    I am installing MacPorts 1.7.0 from a .dmg file. Following, I set up the environment variables in the .profile file, and tried to use Terminal to update using the sudo port selfupdate command from Terminal.
    This is the result I got:
    -bash: sudo: command not found
    Why is this, and what can I do?

    I think the error refers to the command(s) following "sudo." Were you prompted for your password?
    No, that would be:
    sudo fred
    Password:
    sudo: fred: command not found
    But if the command bash is asked to execute is not found you get
    fred
    -bash: fred: command not found
    So I think he is not finding sudo.
    That makes me think that PATH has been messed up, because sudo is in /usr/bin/sudo which is always in PATH unless it has been messed up. Which makes me think that .profile was properly executed, and that is how PATH got messed up.
    So I would look very closely at .profile and make sure PATH is setup correctly. I would expect it to looks something like:
    export PATH="$PATH:/opt/local/bin"

  • How to undo a sudo command?

    I used the following sudo command " sudo rm -rf ~/ .Trash/"  because my trash can wouldn't empty.  Unfortunately this deleted everything on my computer.  Any way to undo this command?  Please help????

    Linc Davis wrote:
    I'm not sure what you mean, but if you gave those instructions, please don't do it again. There is absolutely no reason ever to run such a command, even if the syntax were correct. Also, make sure you test any advice you give on this site on your own computer, as required by the terms of use.
    I have given that command, but with the proper syntax, any number of times, with absoutely no adverse affects. When I do give that command, or any command with rm, I take great pains to emphasize that it absolutely must be copied and pasted in. And I triple and quadruple check the syntax before I post it. And then I make sure that the Jive formating hasn't screwed with it in any way after posting. Given certain situations, it can be very useful.

  • Error executing sudo command

    When I try to execute a sudo command I get the following message:
    "sudo: /etc/sudoers is mode 0644, should be 0440
    Segmentation fault"
    What does it mean?
    Thanks for all the help.

    When I try to execute a sudo command I get the following message:
    "sudo: /etc/sudoers is mode 0644, should be 0440
    Segmentation fault"
    What does it mean?
    It means someone has incorrectly modified the /etc/sudoers file, and as a side effect its permissions were changed to an insecure form, so sudo refuses to use the file. It is also possible that the /etc/sudoers file syntax is also invalid, which might also cause the segmentation fault.
    'visudo' should be used to edit the /etc/sudoers file, which would have properly preserved the permissions, as well as verified that the updated /etc/sudoers file contained valid syntax so that sudo would continue to work. See 'man visudo'.
    You now have a problem, in that you can no longer use sudo to fix the permissions.
    You should first try booting your installation DVD. Via the Menu, you can run Disk Utility and run Repair Permissions. Hopefully this will repair the /etc/sudoers file. You could try running Applications -> Utilities -> Disk Utility, however, if it wants to use sudo to elevate its privileges, that would fail, as a broken /etc/sudoers file is still a broken /etc/sudoers file.
    If you have by any chance enabled the 'root' account, you could try logging in as root and fixing the /etc/sudoers file's permissions.
    You should also run visudo, so that the file's syntax is valid.
    I think you can use the Installation DVD to enable the root account. that might be another way to login as root.
    If repair permissions does not work, then maybe you can put your Mac into firewire target mode, mount your Mac's disk on another Mac via firewire, and repair the /Volume/Macintosh HD/etc/sudoers permissions from the working Mac.
    If that failes, the next step is booting your Mac in Single User mode. Search for "Single User Mode" in the forums, and you should find instructions on both booting, as well as how to make the root file system writable so you can change the permissions from single user mode.
    And if that does not work, I think you are left with reinstalling the OS.
    Message was edited by: BobHarris

  • After typing a sudo command on terminal how do you save it so you dont have to keep giving that same command every time I restart my mac??

    I have a 45mb/s internet at home and my youtube videos load extremely slow, after reading many blogs and empting my cache cleaning my history I stumble across a post that told me i had to block two IP's on the terminal using this two commands: " sudo ipfw add reject src-ip 173.194.55.0/24 in" and "sudo ipfw add reject src-ip 206.111.0.0/16 in" that it should help. After I did that and restarted the mac those commads are undone. Is there a way to save thos commands tipped in the terminal??

    Open the AppleScript Editor in the /Applications/Utilities/ folder and paste in the following:
    set thepass to text returned of (display dialog "Your administrator password is needed." default answer "" buttons {"Cancel", "OK"} default button "OK")
    do shell script "ipfw add reject src-ip 173.194.55.0/24 in" password thepass with administrator privileges
    do shell script "ipfw add reject src-ip 206.111.0.0/16 in" password thepass with administrator privileges
    Save it as an application and add it to the list of login items for your user account in the Users & Groups pane of System Preferences.
    (81466)

  • Getting a fatal relocation error while using a sudo command.

    I am getting the following error while trying to execute a sudo command:
    ld.so.1: sudo: fatal: relocation error: file /usr/local/bin/sudo: symbol closefrom: referenced symbol not found
    the sudo version I use is: 1.6.8p9
    the SUNWcsu package that contains the ld.so.1 library is version: 11.8.0,REV=2000.01.08.18.12
    any ideas?

    Just had the same error
    ld.so.1: sudo: fatal: libintl.so.8: open failed: No such file or directory
    Killed
    was solved by adding the Dependances
    libintl-3.4.0-sol10-sparc-local.gz Libintl is used with gettext and is needed by a few programs when libintl in not in /usr/lib - installs in /usr/local/lib. The 3.4.0 package number indicates that this provides /usr/local/lib/libintl.so.3.4.0 (and also the new /usr/local/lib/libintl.so.8.0.2). Dependencies: libiconv and to have /usr/local/lib/libgcc_s.so.1 and /usr/local/lib/libstdc++.so.6, either the libgcc-3.4.6 or gcc-3.4.6 packages.
    http://www.sunfreeware.com/indexsparc10.html

  • Sudo command missing from Terminal app

    Here is a screenshot that shows missing sudo command.  How do I restore it?  I am not a linux expert, so please keep the answer simple!!

    Its not missing, it simply cannot determine if your user is allowed to sudo since it can't find any sources. This is usually an indication of a corrupt installation.
    Linc Davis offers more insight in this post:
    sudo: unable to stat /etc/sudoers: No such file or directory sudo: no valid sudoers sources found, quitting

  • -bash: sudo: command not found

         Hello all,
    I have had WAY too many problems with this laptop, and at this point in its miserable little life, I've decided to just wipe the hard drive and start fresh, not caring at all what happens to the files left on there. As previously stated in one of my earlier questions (That was, might I add, never fully answered.), this late 2008 MacBook (aluminum) has a problem where it does not boot up, and just endlessly shows the gray spinning pinwheel. Four months later, that just stops, and now when trying to boot up with my normal startup disk, it brings me right to the Recovery disk and tries to reinstall OS X. I tried, it failed 5 minutes in. So I tried to wipe the hard drive, and it says:  Disk Erase failed with the error: Couldn't unmount disk.   I looked it up and I saw that if I went into the Terminal and typed: sudo diskutil unmountDisk /dev/disk0 , it would unmount the disk. But whenever I type that, it says: -bash: sudo: command not found. I have no idea how to fix this, and I would really like to be able to use my laptop again without giving somebody my money to do it for me.
                                                 Thanks,
                                                      Luke

    Clean Install of Snow Leopard
    Be sure to make a backup first because the following procedure will erase
    the drive and everything on it.
         1. Boot the computer using the Snow Leopard Installer Disc or the Disc 1 that came
             with your computer.  Insert the disc into the optical drive and restart the computer.
             After the chime press and hold down the  "C" key.  Release the key when you see
             a small spinning gear appear below the dark gray Apple logo.
         2. After the installer loads select your language and click on the Continue
             button. When the menu bar appears select Disk Utility from the Utilities menu.
             After DU loads select the hard drive entry from the left side list (mfgr.'s ID and drive
             size.)  Click on the Partition tab in the DU main window.  Set the number of
             partitions to one (1) from the Partitions drop down menu, click on Options button
             and select GUID, click on OK, then set the format type to MacOS Extended
             (Journaled, if supported), then click on the Apply button.
         3. When the formatting has completed quit DU and return to the installer.  Proceed
             with the OS X installation and follow the directions included with the installer.
         4. When the installation has completed your computer will Restart into the Setup
             Assistant. After you finish Setup Assistant will complete the installation after which
             you will be running a fresh install of OS X.  You can now begin the update process
             by opening Software Update and installing all recommended updates to bring your
             installation current.
    Download and install Mac OS X 10.6.8 Update Combo v1.1. You may then open App Store, click on the Purchases icon in the toolbar, and re-download any OS X upgrade you purchased except Mavericks. Since Yosemite has been released the App Store may not let you re-download Mavericks, but it will let you download Yosemite.

  • Sudo: command not found

    OK, I got Jaguar installed and all updated on my trusty Wallstreet. the first time I installed it, something got messed up, and the desktop would not show up. So, I reinstalled, with a minmial install, then added in the BSD subsystem. I thought everything was fine, except the terminal would not display "welcome to Darwin!" when opened, instead, all I get is bash-2.05a$ when it starts up.
    So, when trying to run some shell scripts (to uninstall something), I typed in sudo and dragged the script to the terminal window, and pressed enter. all I got was: Sudo: command not found. So, I tried the old standby, su. it asked for my password (yes, I am running this from an admin account), and all it said was su: sorry. I know I am typing in my password correctly.
    the next step was to see where sudo is located, so i typed in
    which sudo
    and all I got was
    no sudo in /bin /sbin /usr/bin /usr/sbin
    so, from the looks of it, sudo was never installed. How am I supposed to get this back? reinstall the BSD subsystem, or is there some Quick and Dirty(tm) way to get it back?
    I am not afraid to play around in the terminal, as I am a Linux/unix junkie.
    thanks.
    -digital

    It's fixed. it was just a bad copy. I got another one, and now when I launch the terminal, it says
    Last login: Fri Mar 2 19:53:49 on ttyp1
    Welcome to Darwin!
    [Leo-Titus-LeBron-Vs-Computer:~] leolebron%
    and when I type sudo, it says:
    usage: sudo -V | -h | -L | -l | -v | -k | -K | [-H] [-P] [-S] [-b] [-p prompt]
    [-u username/#uid] -s | <command>
    So, it all works. I knew something was different, as right after running the setup assistant, it ran software update, which the other copy did not do.
    thanks for all the input.
    -digital

Maybe you are looking for

  • Mini DVI-to-Composite (PAL): Video sync problems

    Hi all, I have a rather awkward-to-explain specific question and I'm wondering if anyone knows enough about video to explain it... I've recently been using my MacBook to play back video through the DVI port to my PAL TV (UK). I have the Mini DVI to v

  • Language conversion of text on buttons in application toll bar of report -

    Hello,    Can you please let us know,   How to convert the language(EN -> FR)  the text  for buttons in application tool bar of a report . I have tried  with SE63.  If SE63, pl let me know the navigation path ? Regards Badari

  • Who can upgrade my macbook pro for me? (In Australia)

    Just a basic macbook pro from apple store 2010, i am using cs6 now and need more ram and speed i quess... I would like to know if the apple store can do it? or is there someone else who does it? I think im looking for a almost maximum upgrade, i want

  • Retrieve deleted messages in SXI_MONITOR

    I'm trying to access some old messages from sxi_monitor. i have the message ID for reference. i saw the message in the SXMSPHIST table in se16 but with a REORG status of DEL. Is there a way to retrieve this message to view the audit log? Thank you. I

  • CS6 Layers question

    I thought I had this down pat but do not. I have text on a page and simply want to add a colored background to just that page. So I select the rectangle tool and create a square about half the page size then fill it with a color. I see that the text