Results 1 to 5 of 5

Thread: SUDO under Unix

  1. #1
    Join Date
    May 2008
    Posts
    29

    SUDO under Unix

    I test to write an order under Unix (mac) which would include order SUDO (to have the privileges of Root)

    but when I enter my order, he asks me my password on another line… I seek to create an achievable Script which would include my password on the same line that my SUDO.


    Thank you to help me!

  2. #2
    Join Date
    May 2008
    Posts
    678

    Re: SUDO under Unix

    What the goal of the required operation?

  3. #3
    Join Date
    May 2008
    Posts
    29

    Re: SUDO under Unix

    The goal is to create a mac application which would carry out the order sudo umount - F

    The problem, it is that when I test to make the application, it fail because the order sudo request the password admin on another line of order and as an application cannot ask for the line of order which requires the password of me, I would like to be able to enter the password the order itself!

  4. #4
    Join Date
    May 2008
    Posts
    1,205

    Re: SUDO under Unix

    Using hdiutil

    The hdiutil program is a native Apple command line utility for working with disk images. It uses the DiskImages framework. Disk images (usually with a .dmg, .img, or .iso file name extension) are often used for distributing programs and for burning CDs/DVDs.

    Creating a disk image from a folder

    hdiutil create test.dmg -srcfolder /path/to/folder/

    Once the disk image is created, it can be mounted, copied, or sent like any other file.

    Mounting a disk image

    To mount (or attach) a disk image, use:

    hdiutil mount test.dmg

    A mounted disk image appears on the Desktop, in the Finder, and shows up as a directory in /Volumes. All removable media, such as CDs, DVDs, external disks, and USB flash drives are mounted in /Volumes.

    Unmounting a disk image

    To unmount (or detach) a disk image, use:

    hdiutil unmount /dev/device-name

    The device name is usually something like /dev/disk3s2. You can also unmount it using the /Volumes/mountpoint if you know where it was mounted:

    hdiutil unmount /Volumes/mountpoint

    Burning an ISO to CD (or DVD)

    First, load a blank CD, then:

    hdiutil burn cd-image.iso

    Create an encrypted disk image

    This creates a 10 MB encrypted disk image and internally formats it as a journaled HFS+ file system (the OS X default):

    hdiutil create -encryption -size 10m -volname encdata test.dmg -fs HFS+J

    During the creation of the disk image, you will be prompted for a password that will allow access to the contents of the disk image. You must remember the password or anything you put into the image will be lost.

  5. #5
    Join Date
    May 2008
    Posts
    29

    Re: SUDO under Unix

    Solved problem…

    I found the order without having rights SUDO

    Opinion with the interested parties, the UNIX order to eject a volume under Mac is hdiutil /volumes/name of volume to be ejected - force


    thank you

Similar Threads

  1. On Macbook Pro accidental sudo rm /*
    By venkat=raghavan in forum Portable Devices
    Replies: 5
    Last Post: 14-11-2010, 06:41 AM
  2. I need help with Ubuntu Sudo
    By drios in forum Operating Systems
    Replies: 1
    Last Post: 25-06-2010, 11:29 PM
  3. Update Problem with Sudo apt
    By Gillian Anderson in forum Windows Software
    Replies: 4
    Last Post: 11-03-2010, 10:22 AM
  4. What is sudo command?
    By chaosblade in forum Operating Systems
    Replies: 3
    Last Post: 21-08-2009, 12:18 PM
  5. Sudo and write permissions
    By goatape in forum Operating Systems
    Replies: 3
    Last Post: 24-03-2009, 07:02 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,535,961.79699 seconds with 16 queries