Delphix Products

 View Only
  • 1.  sudo error on rhel 4

    Posted 03-01-2016 10:40:00 AM
    Hi there,
    I'm trying to provision an "unstructured file" dSource to a RHEL 4 target but it fails with the folowing error:
    ERROR : Could not mount "" at "/delphix"
    ERROR : Details : Trying "mount" using dlpx_pfexec - stty: standard input: Inappropriate ioctl for device;stty: standard input: Inappropriate ioctl for device;;ERROR: No sudo privileges or incorrect password;

    we think the problem is with "!requiretty" and if we run "sudo -l" we get the following:
    [delphix_os@srvdelphn4b ~]$ sudo -l  Matching Defaults entries for delphix_os on this host:      !requiretty, requiretty, env_reset, ignore_local_sudoers, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE      LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY",      timestamp_timeout=5    Runas and Command-specific defaults for delphix_os:      User delphix_os may run the following commands on this host:      (root) NOPASSWD: /bin/mount, (root) /bin/umount, (root) /bin/mkdir, (root) /bin/rmdir, (root) /bin/ps

    we tried also:

    [root@srvdelphn4b ~]# ssh delphix_os@ sudo /bin/mount -t nfs /virtualsite/ The authenticity of host ' (' can't be established. RSA key fingerprint is 5e:3a:2d:f6:56:f6:a5:7b:36:09:a0:64:31:98:6b:f4. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '' (RSA) to the list of known hosts. * * * * * S I S T E M A P R O T E T T O * * * * * L'accesso non autorizzato a questo sistema e' perseguibile legalmente a norma dell'articolo 615-Ter del Codice Penale (Legge n. 547 del 23-12-1993) * * * * * P R O T E C T E D S Y S T E M * * * * * WARNING: Unathorized access to this system forbidden and is prosecuted by law as stated by article n. 615-Ter of "Codice Penale" (Law n. 547, 23 December 1993). delphix_os@'s password: sudo: sorry, you must have a tty to run sudo

    to give you a complete set of infos, this is the sudo file:

    # sudoers file.
    # This file MUST be edited with the 'visudo' command as root.
    # See the sudoers man page for the details on how to write a sudoers file.

    # Host alias specification

    # User alias specification

    # Cmnd alias specification

    # Defaults specification

    # User privilege specification
    root ALL=(ALL) ALL

    # Uncomment to allow people in group wheel to run all commands
    # %wheel ALL=(ALL) ALL

    # Same thing without a password
    # %wheel ALL=(ALL) NOPASSWD: ALL

    # Samples
    # %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
    # %users localhost=/sbin/shutdown -h now

    ## CMDB
    User_Alias CMDB = cmdb
    # Cmnd alias specification
    Cmnd_Alias DMIDECODE = /usr/sbin/dmidecode

    #POC Delphix
    Defaults:delphix_os !requiretty
    delphix_os ALL=NOPASSWD: \
    /bin/mount, /bin/umount, /bin/mkdir, /bin/rmdir, /bin/ps

    can someone help me?

  • 2.  RE: sudo error on rhel 4
    Best Answer

    Posted 03-01-2016 12:06:00 PM

    It looks like you have a "requiretty" following and negating the "!requiretty":
    [delphix_os@srvdelphn4b ~]$ sudo -l
    Matching Defaults entries for delphix_os on this host:      !requiretty, requiretty

    I can't see the rest of your sudoers file but you may have some other default in the file.


  • 3.  RE: sudo error on rhel 4

    Posted 03-01-2016 12:42:00 PM
    Hallo Neal,
    you're correct... I've been digging around asking customer people andI discovered there is a sudo configuration which is centralized at LDAP level, so my sudoer file was correct but it was overridden by the centralized settings...
    we've disabled LDAP sudo configand everything was ok at first shot.