• Can't run script on server

    From Java Jive@21:1/5 to All on Wed Dec 18 18:39:43 2024
    XPost: alt.os.linux

    I have a QNAP 241+ server running the latest firmware, which exports
    linux shares under NFS, and a laptop running Ubuntu 22 which contains
    the following line in /etc/fstab ...

    IPAddress:/Path /media/servername nfs user,defaults,rw,noauto 0 0

    ... allowing the share to be mounted by clicking the desktop icon or in
    the file explorer. My user credentials are identical on the two
    machines, particularly the user and group ID numbers are identical,
    EXCEPT, for the greater convenience of Windows clients, the actual
    username itself is proper-cased on the Server to match those on the
    Windows clients, whereas it has to be all lower case on the Ubuntu
    client, while on the server the root account is called admin, but still
    has user ID = 0. Please note carefully the following sequence:

    username@hostname:Slides# ssh admin@servername
    Enter passphrase for key '/home/username/.ssh/id_rsa':
    [~] # cd /Path/Slides
    [Slides] # ll *.sh
    -rwxrwxr-x 1 admin admins 55 2024-12-18 15:16 SlidesBackUp.sh*
    -rwxrwxr-x 1 admin admins 52 2024-12-18 15:16 SlidesBlink.sh*
    [Slides] # ll -n *.sh
    -rwxrwxr-x 1 0 1000 55 2024-12-18 15:16 SlidesBackUp.sh*
    -rwxrwxr-x 1 0 1000 52 2024-12-18 15:16 SlidesBlink.sh*
    [Slides] # grep admins /etc/group
    admins:x:1000:admin,Username
    [Slides] # grep Username /etc/passwd Username:x:1002:1002:UserDescription,,,:/share/homes/Username:/bin/sh
    [Slides] # exit
    logout
    Connection to servername closed.
    username@hostname:Slides# ll *.sh
    -rwxrwxr-x 1 root admins 55 2024-12-18 15:16 SlidesBackUp.sh*
    -rwxrwxr-x 1 root admins 52 2024-12-18 15:16 SlidesBlink.sh* username@hostname:Slides# ll -n *.sh
    -rwxrwxr-x 1 0 1000 55 2024-12-18 15:16 SlidesBackUp.sh*
    -rwxrwxr-x 1 0 1000 52 2024-12-18 15:16 SlidesBlink.sh* username@hostname:Slides# grep admins /etc/group
    admins:x:1000:root,username
    username@hostname:Slides# grep username /etc/passwd username:x:1002:1002:UserDescription,,,:/home/username:/bin/bash username@hostname:Slides# which bash
    /usr/bin/bash
    username@hostname:Slides# cat SlidesBlink.sh
    #!/usr/bin/bash
    feh -Fds -A './SlidesBackUp.sh %F'
    username@hostname:Slides# ./SlidesBlink.sh
    bash: ./SlidesBlink.sh: Permission denied

    Why can't I run the script? All the relevant credentials are identical
    except the capitalisation of the username, but surely it should be using
    in preference the numeric ids anyway?

    A similar but related problem ...

    Time was, when accessing a Windows share from a Linux machine, you could
    use an smbusers file to translate between usernames on the two machines,
    so that, if the passwords on the corresponding accounts were identical,
    you wouldn't be prompted for credentials when accessing one from the other.

    A typical smbusers file in its simplest form would read thus:

    # This file allows you to map usernames from the clients to the server.
    # Unix_name = SMB_name1 SMB_name2 ...
    #
    # Cf. section 'username map' in the manual page of smb.conf for more
    # information.

    !root = Administrator
    username = Username
    nobody = guest pcguest smbguest

    This functionality doesn't seem to work any more. Can anyone suggest
    how to make it work again?

    --

    Fake news kills!

    I may be contacted via the contact address given on my website:
    www.macfh.co.uk

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Java Jive@21:1/5 to Anssi Saari on Wed Dec 18 19:45:12 2024
    XPost: alt.os.linux

    On 2024-12-18 19:19, Anssi Saari wrote:
    Java Jive <java@evij.com.invalid> writes:

    Why can't I run the script? All the relevant credentials are
    identical except the capitalisation of the username, but surely it
    should be using in preference the numeric ids anyway?

    That 'user' mount option implies also option noexec.

    Tx. I was wondering about that, but searches didn't come up with much.
    Is there anyway of allowing user mounts without noexec?

    --

    Fake news kills!

    I may be contacted via the contact address given on my website:
    www.macfh.co.uk

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carlos E.R.@21:1/5 to Java Jive on Wed Dec 18 20:59:30 2024
    XPost: alt.os.linux

    On 2024-12-18 20:45, Java Jive wrote:
    On 2024-12-18 19:19, Anssi Saari wrote:
    Java Jive <java@evij.com.invalid> writes:

    Why can't I run the script?  All the relevant credentials are
    identical except the capitalisation of the username, but surely it
    should be using in preference the numeric ids anyway?

    That 'user' mount option implies also option noexec.

    Tx.  I was wondering about that, but searches didn't come up with much.
    Is there anyway of allowing user mounts without noexec?


    exec :-)

    --
    Cheers, Carlos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Java Jive@21:1/5 to Java Jive on Wed Dec 18 20:01:37 2024
    XPost: alt.os.linux

    On 2024-12-18 19:45, Java Jive wrote:
    On 2024-12-18 19:19, Anssi Saari wrote:
    Java Jive <java@evij.com.invalid> writes:

    Why can't I run the script?  All the relevant credentials are
    identical except the capitalisation of the username, but surely it
    should be using in preference the numeric ids anyway?

    That 'user' mount option implies also option noexec.

    Tx.  I was wondering about that, but searches didn't come up with much.
    Is there anyway of allowing user mounts without noexec?

    I've found the solution now. The following does it:

    IPAddress:/Path /media/servername nfs user,defaults,exec,rw,noauto 0 0

    Thanks for your help.

    --

    Fake news kills!

    I may be contacted via the contact address given on my website:
    www.macfh.co.uk

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anssi Saari@21:1/5 to Java Jive on Wed Dec 18 21:19:28 2024
    XPost: alt.os.linux

    Java Jive <java@evij.com.invalid> writes:

    Why can't I run the script? All the relevant credentials are
    identical except the capitalisation of the username, but surely it
    should be using in preference the numeric ids anyway?

    That 'user' mount option implies also option noexec.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)