Bad interpreter? Bash? No way! - Mandriva

This is a discussion on Bad interpreter? Bash? No way! - Mandriva ; On Jun 19, 5:35 pm, Dave wrote: > shed...@gmail.com wrote: > > [jazze17@mondo ~]$ su root > > Password: > > [root@mondo jazze17]# chown jazze17.jazze17 kludge > > [root@mondo jazze17]# exit > > exit > > [jazze17@mondo ~]$ ls -ald ...

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 21 to 26 of 26

Thread: Bad interpreter? Bash? No way!

  1. Re: Bad interpreter? Bash? No way!

    On Jun 19, 5:35 pm, Dave wrote:
    > shed...@gmail.com wrote:
    > > [jazze17@mondo ~]$ su root
    > > Password:
    > > [root@mondo jazze17]# chown jazze17.jazze17 kludge
    > > [root@mondo jazze17]# exit
    > > exit
    > > [jazze17@mondo ~]$ ls -ald $PWD
    > > drwx------ 43 jazze17 users 4096 Jun 19 16:43 /home/jazze17/
    > > [jazze17@mondo ~]$ chmod 755 kludge
    > > [jazze17@mondo ~]$ echo $PWD/kludge
    > > /home/jazze17/kludge
    > > [jazze17@mondo ~]$ $PWD/kludge
    > > -bash: /home/jazze17/kludge: /bin/bash: bad interpreter: Permission
    > > denied
    > > [jazze17@mondo ~]$

    >
    > cd /home
    > ls -al
    >
    > Also... "whereis bash" and "ls -al /bin/bash"

    [jazze17@mondo home]$ whereis bash
    bash: /bin/bash /usr/share/man/man1/bash.1.bz2
    [jazze17@mondo home]$ ls -al /bin/bash
    -rwxr-xr-x 1 root root 725160 Aug 24 2006 /bin/bash*


  2. Re: Bad interpreter? Bash? No way!

    On 2007-06-19, lordy wrote:
    > On 2007-06-19, shedied@gmail.com wrote:
    >> [jazze17@mondo ~]$ id
    >> uid=502(jazze17) gid=502(jazze17) groups=12(mail),81(audio),
    >> 502(jazze17)
    >> [jazze17@mondo ~]$ ls -al kludge
    >> -rwxrwxr-x 1 jazze17 users 44 Jun 19 12:19 kludge*
    >> [jazze17@mondo ~]$ recode ibmpc..lat1 kludge
    >> recode: kludge failed: Ambiguous output in step `CR-LF..data'
    >> [jazze17@mondo ~]$ cat kludge
    >> #!/bin/bash
    >> basename $SHELL
    >> echo "it works"
    >> [jazze17@mondo ~]$ ./kludge
    >> -bash: ./kludge: /bin/bash: bad interpreter: Permission denied

    >
    > What is the output of 'mount' on its own?
    > Also what happens if you do it as root?
    >
    > Sorry if this has been asked already.
    >
    > Lordy


    Is it possible your home partition is mounted with 'noexec' ?

    What happens if you create a new user, and try it from their account?

    Also, as before:
    What is the output of 'mount' on its own?
    Also what happens if you do it as root?

    Lordy

  3. Re: Bad interpreter? Bash? No way!

    On Jun 19, 6:33 pm, lordy wrote:
    > On 2007-06-19, lordy wrote:
    >
    >
    >
    > > On 2007-06-19, shed...@gmail.com wrote:
    > >> [jazze17@mondo ~]$ id
    > >> uid=502(jazze17) gid=502(jazze17) groups=12(mail),81(audio),
    > >> 502(jazze17)
    > >> [jazze17@mondo ~]$ ls -al kludge
    > >> -rwxrwxr-x 1 jazze17 users 44 Jun 19 12:19 kludge*
    > >> [jazze17@mondo ~]$ recode ibmpc..lat1 kludge
    > >> recode: kludge failed: Ambiguous output in step `CR-LF..data'
    > >> [jazze17@mondo ~]$ cat kludge
    > >> #!/bin/bash
    > >> basename $SHELL
    > >> echo "it works"
    > >> [jazze17@mondo ~]$ ./kludge
    > >> -bash: ./kludge: /bin/bash: bad interpreter: Permission denied

    >
    > > What is the output of 'mount' on its own?
    > > Also what happens if you do it as root?

    >
    > > Sorry if this has been asked already.

    >
    > > Lordy

    >
    > Is it possible your home partition is mounted with 'noexec' ?
    >
    > What happens if you create a new user, and try it from their account?
    >
    > Also, as before:
    > What is the output of 'mount' on its own?

    [jazze17@mondo ~]$ mount
    /dev/hda1 on / type ext3 (rw)
    none on /proc type proc (rw)
    /dev/hda5 on /home type ext3 (rw,noexec,nosuid,nodev)
    none on /mnt/floppy type supermount (rw,sync,dev=/dev/
    fd0,fs=ext2:vfat,--)
    /dev/hda6 on /usr type ext3 (rw)
    /dev/hdb8 on /USR type ext3 (rw)
    none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    /dev/hdb3 on /win_z type vfat (rw)
    /dev/hda7 on /MEDIA type vfat (rw)
    /dev/hdb7 on /HOME type ext3 (rw)
    /dev/hdb9 on /VAR type ext3 (rw)
    /dev/hdb5 on /ROOT type ext3 (rw)
    [jazze17@mondo ~]$

    > Also what happens if you do it as root?

    The kludge script above ran fine as root, and it displayed:
    "bash" followed by
    "it works"
    So I copied it over to jazze17's home, knowing that it's clean, and
    made jazze17 the owner and chmod +x but still got denied.

    For kicks I copied it over to another user jazze, from root's home.
    and chown & chmod and also got denied. Is the 'noexec' the key?


  4. Re: Bad interpreter? Bash? No way!

    On Jun 19, 7:58 pm, shed...@gmail.com wrote:
    > On Jun 19, 6:33 pm, lordy wrote:
    >
    > > On 2007-06-19, lordy wrote:

    >
    > > > On 2007-06-19, shed...@gmail.com wrote:
    > > >> [jazze17@mondo ~]$ id
    > > >> uid=502(jazze17) gid=502(jazze17) groups=12(mail),81(audio),
    > > >> 502(jazze17)
    > > >> [jazze17@mondo ~]$ ls -al kludge
    > > >> -rwxrwxr-x 1 jazze17 users 44 Jun 19 12:19 kludge*
    > > >> [jazze17@mondo ~]$ recode ibmpc..lat1 kludge
    > > >> recode: kludge failed: Ambiguous output in step `CR-LF..data'
    > > >> [jazze17@mondo ~]$ cat kludge
    > > >> #!/bin/bash
    > > >> basename $SHELL
    > > >> echo "it works"
    > > >> [jazze17@mondo ~]$ ./kludge
    > > >> -bash: ./kludge: /bin/bash: bad interpreter: Permission denied

    >
    > > > What is the output of 'mount' on its own?
    > > > Also what happens if you do it as root?

    >
    > > > Sorry if this has been asked already.

    >
    > > > Lordy

    >
    > > Is it possible your home partition is mounted with 'noexec' ?

    >
    > > What happens if you create a new user, and try it from their account?

    >
    > > Also, as before:
    > > What is the output of 'mount' on its own?

    >
    > [jazze17@mondo ~]$ mount
    > /dev/hda1 on / type ext3 (rw)
    > none on /proc type proc (rw)
    > /dev/hda5 on /home type ext3 (rw,noexec,nosuid,nodev)
    > none on /mnt/floppy type supermount (rw,sync,dev=/dev/
    > fd0,fs=ext2:vfat,--)
    > /dev/hda6 on /usr type ext3 (rw)
    > /dev/hdb8 on /USR type ext3 (rw)
    > none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    > /dev/hdb3 on /win_z type vfat (rw)
    > /dev/hda7 on /MEDIA type vfat (rw)
    > /dev/hdb7 on /HOME type ext3 (rw)
    > /dev/hdb9 on /VAR type ext3 (rw)
    > /dev/hdb5 on /ROOT type ext3 (rw)
    > [jazze17@mondo ~]$
    >
    > > Also what happens if you do it as root?

    >
    > The kludge script above ran fine as root, and it displayed:
    > "bash" followed by
    > "it works"
    > So I copied it over to jazze17's home, knowing that it's clean, and
    > made jazze17 the owner and chmod +x but still got denied.
    >
    > For kicks I copied it over to another user jazze, from root's home.
    > and chown & chmod and also got denied. Is the 'noexec' the key?



    Turns out it is. Went into /etc/fstab, set the partition to 'defaults
    1,2'. Works now. Thanks lordy! And to all who participated, thanks for
    playing! What a downer. Am trying to recall where this one got set
    during installation


  5. Re: Bad interpreter? Bash? No way!

    On Tue, 19 Jun 2007 19:58:10 -0400, wrote:

    > [jazze17@mondo ~]$ mount
    > /dev/hda1 on / type ext3 (rw)
    > none on /proc type proc (rw)
    > /dev/hda5 on /home type ext3 (rw,noexec,nosuid,nodev)


    The noexec, in the above line, is the cause of the problems.
    Change the line in /etc/fstab.

    > none on /mnt/floppy type supermount (rw,sync,dev=/dev/
    > fd0,fs=ext2:vfat,--)
    > /dev/hda6 on /usr type ext3 (rw)
    > /dev/hdb8 on /USR type ext3 (rw)
    > none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    > /dev/hdb3 on /win_z type vfat (rw)
    > /dev/hda7 on /MEDIA type vfat (rw)
    > /dev/hdb7 on /HOME type ext3 (rw)
    > /dev/hdb9 on /VAR type ext3 (rw)
    > /dev/hdb5 on /ROOT type ext3 (rw)


    Directory and filenames are case sensetive, in linux.

    /HOME, is not the same as /home. Linux usually uses /home.
    Having /USR, /MEDIA, /HOME, /VAR, and /ROOT, instead
    of /usr, /media, /home, /var, and /ROOT is going to
    cause a lot of problems. Right now, I expect all of the
    directory/mountpoints, with uppercase names, are being
    completly ignored, and empty, unless you've manuall copied
    files to them.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  6. Re: Bad interpreter? Bash? No way!

    On Jun 19, 9:55 pm, "David W. Hodgins"
    wrote:
    > On Tue, 19 Jun 2007 19:58:10 -0400, wrote:
    > > [jazze17@mondo ~]$ mount
    > > /dev/hda1 on / type ext3 (rw)
    > > none on /proc type proc (rw)
    > > /dev/hda5 on /home type ext3 (rw,noexec,nosuid,nodev)

    >
    > The noexec, in the above line, is the cause of the problems.
    > Change the line in /etc/fstab.
    >
    > > none on /mnt/floppy type supermount (rw,sync,dev=/dev/
    > > fd0,fs=ext2:vfat,--)
    > > /dev/hda6 on /usr type ext3 (rw)
    > > /dev/hdb8 on /USR type ext3 (rw)
    > > none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    > > /dev/hdb3 on /win_z type vfat (rw)
    > > /dev/hda7 on /MEDIA type vfat (rw)
    > > /dev/hdb7 on /HOME type ext3 (rw)
    > > /dev/hdb9 on /VAR type ext3 (rw)
    > > /dev/hdb5 on /ROOT type ext3 (rw)

    >
    > Directory and filenames are case sensetive, in linux.
    >
    > /HOME, is not the same as /home. Linux usually uses /home.
    > Having /USR, /MEDIA, /HOME, /VAR, and /ROOT, instead
    > of /usr, /media, /home, /var, and /ROOT is going to
    > cause a lot of problems. Right now, I expect all of the
    > directory/mountpoints, with uppercase names, are being
    > completly ignored, and empty, unless you've manuall copied
    > files to them.
    >

    Understood. I have old apps lying there, from Mandrake 10.1 and some
    mp3's and they are on a separate harddrive. Didn't want to go thru the
    trouble of locating updated RPMs (if any exist) or using the available
    space on the new hard drive when I did the upgrade to Mandriva.


+ Reply to Thread
Page 2 of 2 FirstFirst 1 2