PAM doesn't like /usr/bin/bash set as shell

Can anyone explain why PAM is fine with /usr/bin/zsh set as login shell but not /usr/bin/bash.  For bash it must be set to /bin/bash.
Should I file a bug report?
Here is an example https://bbs.archlinux.org/viewtopic.php?pid=1454302
By default the archiso has /usr/bin/zsh set as the root login shell.  Line 10: https://projects.archlinux.org/archiso. … irootfs.sh

qwerty12 wrote:I haven't bothered testing this hypothesis, but my guess is that it is because /etc/shells has entries for both /bin/zsh and /usr/bin/zsh but only /bin/bash for bash.
To test your hypothesis, I added /usr/bin/bash to /etc/shells and changed the login shell. 
I was still blocked by PAM from logging in with ssh.

Similar Messages

  • Volume up shortcut not working `/usr/bin/amixer set Master playback`

    I used to use something like
    /usr/bin/amixer set Master playback 2+
    to increase/decrease volume but it seems to have stopped working after update and changing to GNOME3 from XFCE 4.10. Same in terminal, has the syntax changed?

    In the console:
    [jiewmeng@JM Nodebook]$ /usr/bin/amixer set Master playback 2-
    Simple mixer control 'Master',0
    Capabilities: pvolume pswitch pswitch-joined penum
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 65536
    Mono:
    Front Left: Playback 21533 [33%] [on]
    Front Right: Playback 21533 [33%] [on]
    [jiewmeng@JM Nodebook]$ /usr/bin/amixer set Master playback 2-
    Simple mixer control 'Master',0
    Capabilities: pvolume pswitch pswitch-joined penum
    Playback channels: Front Left - Front Right
    Limits: Playback 0 - 65536
    Mono:
    Front Left: Playback 21531 [33%] [on]
    Front Right: Playback 21531 [33%] [on]
    notice theres no change ... 33%. Oh then I did Ctrl+Alt+F2 to go into console. Then did the same with same results. Then did with sudo and it worked. It worked b4 without sudo? Maybe I messed up something? Btw, this happened after I did `sudo pacman -Syyu gnome`. Maybe it changed some config? Or maybe its the upgrades?

  • Authentication error with shell=/usr/bin/bash

    Hello there,
    I'm comfortable with linux, but new with Arch Linux. Recently I completed an installation with success but I ran into a strange authentication error at login.
    Before adding a user I verified the path of the bash shell and 'which bash' returned /usr/bin/bash.
    So I added a user with shell /usr/bin/bash and the line in /etc/passwd reads similar to:
    newuser:x:1000:100:His name:/home/newuser:/usr/bin/bash
    With this line I get an authentication error from login
    And when I change the shell to /bin/bash, the user is able to login with success.
    I have found similar problem reports, but not this solution.
    I hope to get some help with understanding this issue, to me it seems wrong to point the shell in /etc/passwd to a symbolic link.

    Thank you very much, falconindy.
    My first reaction is "But what if /usr becomes inaccessible", also /bin/sh is a symlink.
    But I guess with rescue options from initramfs or live CD/usb, this is not a big issue anymore.
    I have added /usr/bin/bash to /etc/shells.
    Last edited by wilbert-vb (2013-05-18 12:55:45)

  • /usr/bin/bash[34]: syntax error at line 40 : `set' unexpected

    Hi All
    I would like to install Oracle Database 11gR1 On Solaris 10
    When I run root.sh command, I confused to input path
    *# cd /home/oracle11/app/oracle11/product/11.1.0/db_1*
    *# ./root.sh*
    Running Oracle 11g root.sh script...
    The following environment variables are set as:
    ORACLE_OWNER= oracle11
    ORACLE_HOME=  /usr2/home/oracle11/app/oracle11/product/11.1.0/db_1
    *Enter the full pathname of the local bin directory: [usr/local/bin]:/usr/bin/bash*
    I have inputed "/usr/bin/bash"
    Now I can not run bash on Solaris 10.
    *# bash*
    bash[34]: syntax error at line 40 : `set' unexpected
    Please help me!
    Thankyou and best regards,
    thiensu2810

    Hi
    Output of "$ find /usr -name bash 2>/dev/null" is
    *# find /usr -name bash 2>/dev/null*
    */usr/bin/bash*
    *# less /usr/bin/bash*
    +###################################+
    +#+
    +# $Header: coraenv.sh 17-may-2007.08:31:33 jboyce Exp $ coraenv+
    +#+
    +# Copyright (c) 1987, 2007, Oracle. All rights reserved.+
    +#+
    +# This routine is used to condition a C shell user's environment+
    +# for access to an ORACLE database. It should be installed in+
    +# the system local bin directory.+
    +#+
    +# The user will be prompted for the database SID, unless the variable+
    +# ORAENV_ASK is set to NO, in which case the current value of ORACLE_SID+
    +# is used.+
    +# An asterisk '*' can be used to refer to the NULL SID.+
    +#+
    +# 'dbhome' is called to locate ORACLE_HOME for the SID. If+
    +# ORACLE_HOME cannot be located, the user will be prompted for it also.+
    +# The following environment variables are set:+
    +#+
    +# ORACLE_SID Oracle system identifier+
    +# ORACLE_HOME Top level directory of the Oracle system hierarchy+
    +# PATH Old ORACLE_HOME/bin removed, new one added+
    +# ORACLE_BASE Top level directory for storing data files and+
    +..................................+
    +.................................+
    else
    if (-e $ORABASE_EXEC) then
    if (-x $ORABASE_EXEC) then
    set BASEVAL=`$ORABASE_EXEC`
    setenv ORACLE_BASE $BASEVAL
    echo "The Oracle base for ORACLE_HOME=$ORACLE_HOME is $ORACLE_BASE"
    else
    echo "The $ORACLE_HOME/bin/orabase binary does not have execute privile
    ge"
    echo "for the current user, $USER.  Rerun the script after changing"
    echo "the permission of the mentioned executable."
    endif
    else
    setenv ORACLE_BASE $ORACLE_HOME
    echo "The Oracle base for ORACLE_HOME=$ORACLE_HOME is $ORACLE_BASE"
    endif
    endif
    +#+
    +# Install local modifications here+
    +#+
    thank,
    thiensu2810

  • /usr/bin/bash runs a new shell where PS1 is not set

    When I execute the command bash in my terminal, it opens a new shell which properly reads all bashrc contents. But when I run /usr/bin/bash, then it is as if  $PS1 is not set and those parts in my bashrc that are supposed to used only for interactive shells are not read at all.
    The weird part is running which bash gives /usr/bin/bash. So, I'm not able to figure out why running bash and /usr/bin/bash produce different results. Also, although it appears as if $PS1 is not being set (based on reading of my bashrc), the prompt is still being set.
    Can anyone explain why this variation is happening?
    PS: Not sure if this matters, but my bashrc is not in the default location. It is in ~/.config/bash and I've modified my /etc/bash.bashrc to source the local bashrc from the custom location.
    Last edited by hashken (2015-04-15 13:19:03)

    Does the behaviour persist if you move .bashrc back to the conventional location?
    Yeah, the behaviour persists even after moving back bashrc.
    The contents of my /etc/bash.bashrc file:
    # /etc/bash.bashrc
    # If not running interactively, don't do anything
    if [[ ! $- != *i* ]]; then
    PS1='[\u@\h \W]\$ '
    PS2='> '
    PS3='> '
    PS4='+ '
    case ${TERM} in
    xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
    screen)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
    esac
    [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
    fi
    XDG_CONFIG_HOME=$HOME/.config
    XDG_CACHE_HOME=$HOME/.cache
    XDG_DATA_HOME=$HOME/.local/share
    if [ -f "$XDG_CONFIG_HOME/bash/bashrc" ] && [ "$0" = "bash" ]; then
    . "$XDG_CONFIG_HOME/bash/bashrc"
    fi
    if [ -f "$XDG_DATA_HOME/bash/history" ] && [ "$0" = "bash" ]; then
    HISTFILE="${XDG_DATA_HOME}/bash/history"
    fi
    The contents of my bashrc file:
    if [ -f $XDG_CONFIG_HOME/bash/xdg ]; then
    . $XDG_CONFIG_HOME/bash/xdg
    fi
    if [ -f $XDG_CONFIG_HOME/bash/private ]; then
    . $XDG_CONFIG_HOME/bash/private
    fi
    # If not running interactively, don't do anything else
    if [ -z "$PS1" ]; then
    PATH=$PATH:$HOME/bin/others
    return
    fi
    #test "$PS1" || return
    if [ -f $XDG_CONFIG_HOME/bash/colors ]; then
    . $XDG_CONFIG_HOME/bash/colors
    fi
    if [ -f $XDG_CONFIG_HOME/bash/general ]; then
    . $XDG_CONFIG_HOME/bash/general
    fi
    if [ -f $XDG_CONFIG_HOME/bash/aliases ]; then
    . $XDG_CONFIG_HOME/bash/aliases
    fi
    if [ -f $XDG_CONFIG_HOME/bash/functions ]; then
    . $XDG_CONFIG_HOME/bash/functions
    fi
    if [ -f $XDG_CONFIG_HOME/bash/completion ]; then
    . $XDG_CONFIG_HOME/bash/completion
    fi
    What makes you think $PS1 is not being set if the prompt is correct?
    Both bash/xdg and bash/private are getting sourced. But when I run /bin/bash, the other files (colors, general, aliases etc.) are not getting sourced. Since, I'm doing a $PS1 test before sourcing these files, I concluded that $PS1 is not being set.

  • Is /bin/sh must link to /usr/bin/bash?

    I'm building Arch Linux on embedded system which CPU is sh4.
    I found there is a problem of bash package.
    It creates /bin/sh as a symbolic link to /usr/bin/bash.
    But my /bin/sh is busybox.
    1. I'm wonder how could I keep /bin/sh to busybox's /bin/sh? Or, it could set on pacman.conf?
    2. Could my root account still use 'sh' as its shell? I wish busybox could still exist as the basement.
    3. Is makepkg or yaourt based on root's shell must be bash?

    Thank you Allan,
    I have this question is because /usr/bin/bash require many dynamic library and I just failed login my embedded system after upgrade bash with pacman -Udd option.
    Am I right of the following assumption (Sorry, I can not 100% understand your meaning, require double confirm.).
    1. I can keep my root's shell as /bin/sh (it's busybox version).
    2. I can config pacman to use /bin/bash for install (I've compiled brand new pacman)
    3. makepkg have forced to use /bin/bash for install
    BTW, I found it is required bash 4.0 (declare function)  My embedded system's original linux only provide bash 3.0.  So, it took me a while to prepare bash 4.0.
    Last edited by dlin (2013-01-31 06:42:22)

  • Apply patch 6194129 lot of  /usr/bin/ld errors

    Hi
    os...linux-x86.
    ebs:11.5.10
    Trying to apply patch 6194129 (developer6i_patch19). Getting lot of error messages like /usr/bin/ld: warning: i386 architecture of input file `tmabox.o' is incompatible with i386:x86-64 output.
    logfile:
    /usr/bin/ld: warning: i386 architecture of input file `uatstubs.o' is incompatible with i386:x86-64 output
    /of02/patches/developer6i_patch19/bin/genshlib ifjapi60 0
    /usr/bin/ld: warning: i386 architecture of input file `context.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `create.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `destroy.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `formsapi.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `iauasst.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `iauexcep.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `ifjapi.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `objlib.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `persistc.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `ibp30r.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `ibp30w.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `ibp40r.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `ibp40w.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `ibp4cr.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `ibp4cw.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `ibp4gr.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `ibp4gw.o' is incompatible with i386:x86-64 output
    /usr/bin/ld: warning: i386 architecture of input file `ibp4wr.o' is incompatible with i386:x86-64 output
    etc

    The error message indicates that you are trying to apply a 32-bit patch on a 64-bit OS.
    I understand you are running 11i on 32-bit OS, so have you downloaded the correct version of the patch?
    Do you have the 32-bit version of gcc file installed?
    Also, please make sure that ORACLE_HOME is set to 8.0.6 ORACLE_HOME (not to iAS_ORACLE_HOME as mentioned in the patch README file).
    If all the above are correct, then you may proceed with the patch and see if it applies successfully.
    Thanks,
    Hussein

  • /usr/bin/ld215 not availbel in RHEL 5.4 - For 11.5.10.2 Installation

    Hi Friends,
    I am installaing 11.5.10.2 on RHEL 5.4
    The Metalink Note says : (Oracle Applications Installation Update Notes, Release 11i (11.5.10.2) [ID 316806.1] )
    For Oracle Linux 5 and Red Hat Enterprise Linux 5 only :
    *# ln -s /usr/bin/ld215 /usr/bin/ld*
    But i don't have the file /usr/bin/ld215 .
    Even this note (Oracle Applications 11i Installation on OEL5 or RHEL5 [ID 730444.1]) says to perform
    mv /usr/bin/ld /usr/bin/ld.old
    ln -s /usr/bin/ld215 /usr/bin/ld
    But i have /usr/bin/ld and doesn't have /usr/bin/ld215 ( In reverse)
    If i perform the :
    mv /usr/bin/ld /usr/bin/ld.old
    ln -s /usr/bin/ld215 /usr/bin/ld
    i get error (/usr/bin/ld not found) in system check so i left /usr/bin/ld as it is
    Is the command *# ln -s /usr/bin/ld215 /usr/bin/ld* wrong (should it be otherway) ? How do i get this file ? can i skip this? I don't find any error on system check in rapidwiz but will it cause any issue in future/
    Please suggest
    Regards,
    DB

    Hi Hussein,
    It got fixed after installating the rpm compat-binutils215-2.15.92.0.2-24.i386.rpm ( as a pre req of compat-oracle-el5-1.0-5)
    Regards,
    DB

  • Trying to Arch-Chroot after messing up an update, can't run /bin/bash

    Hey guys,
    I made so absolutely dumb errors recently I just haven't been sound in mind.
    So I'm updating my system after months and I'm doing what is described here https://www.archlinux.org/news/binaries … ervention/
    My first mistake is when I forgot to do pacman -S bash and pacman -Su  after doing pacman -Syu --ignore filesystem,bash in the last section. So I had to chroot into my system to do the last 2 updates.
    I chrooted in and succesfully updated bash. But then I forgot to do pacman -Su! So my filesystem is still not updated haha...
    Well I tried to chroot in again to do the last update, and now I get this error.
    chroot: failed to run command (block ascii)/bin/(block ascii)sh(block ascii): No such file or directory.
    Which probably actually reads as /bin/bash: no such file or directory.
    I'm not sure how to fix this issue with bash. As I said I updated bash without updating the filesystem when I chrooted...hoping someone knows what I can do.
    Thanks!

    Either point it to /usr/bin/bash (arch-chroot /mnt /usr/bin/bash) or just update from outside the chroot (pacman --root /mnt -Su)
    Last edited by Scimmia (2013-08-26 03:22:11)

  • Are /usr/ubc binaries different than /usr/bin binaries?

    Hi,
    I am running SunOS 5.8 and I have following questions about solaris distribution:
    1. Are /usr/ucb binaries different than regular binaries like /usr/bin etc...
    Because at file level they appear to be the same:
    e.g. ps
    $ ls -ltr /usr/ucb/ps /usr/bin/ps
    -r-xr-xr-x 38 root bin 5.2K Jan 5 2000 /usr/ucb/ps
    -r-xr-xr-x 38 root bin 5.2K Jan 5 2000 /usr/bin/ps
    2. Are /usr/ubc binaries are part of standared solaris distribution?
    Thanks

    Hi,
    I am running SunOS 5.8 on SPARC I assume...
    and I have following
    questions about solaris distribution:
    1. Are /usr/ucb binaries different than regular
    binaries like /usr/bin etc...Yup (at least most of the time). /usr/ucb/ gives some behavior of older BSD systems for compatibility.
    Because at file level they appear to be the same:
    e.g. ps
    $ ls -ltr /usr/ucb/ps /usr/bin/ps
    -r-xr-xr-x 38 root bin 5.2K Jan 5 2000 /usr/ucb/ps
    -r-xr-xr-x 38 root bin 5.2K Jan 5 2000 /usr/bin/psThis is a side effect of a feature called 'isaexec'. You'll notice the link count is 38, so this file is linked as 38 different names.
    The 'ps' command looks through /proc, so the binary has to match the currently running kernel architecture (whether 32-bit or 64-bit). 'isaexec' allows you to have multiple binaries that are called properly based on architecture.
    On my machine:
    # ls -litr /usr/ucb/ps /usr/bin/ps /usr/lib/isaexec
    18227 -r-xr-xr-x 37 root bin 5256 Jan 5 2000 /usr/ucb/ps
    18227 -r-xr-xr-x 37 root bin 5256 Jan 5 2000 /usr/lib/isaexec
    18227 -r-xr-xr-x 37 root bin 5256 Jan 5 2000 /usr/bin/ps
    So all 'isaexec' does is look for a binary with the same name as it was called in the architecture specific directories. So for /usr/ucb/ps, it's these:
    # ls -l /usr/ucb/sparcv7/ps /usr/ucb/sparcv9/ps
    -r-xr-xr-x 1 root sys 23504 Jul 15 2005 /usr/ucb/sparcv7/ps
    -r-xr-xr-x 1 root sys 32264 Jul 15 2005 /usr/ucb/sparcv9/ps
    And for /usr/bin/ps It's these:
    # ls -l /usr/bin/sparcv7/ps /usr/bin/sparcv9/ps
    -r-sr-xr-x 1 root sys 29196 Jul 15 2005 /usr/bin/sparcv7/ps
    -r-sr-xr-x 1 root sys 38536 Jul 15 2005 /usr/bin/sparcv9/ps
    So different binaries (and different architectures):
    # file /usr/bin/sparcv7/ps /usr/bin/sparcv9/ps /usr/ucb/sparcv7/ps /usr/ucb/sparcv9/ps
    /usr/bin/sparcv7/ps: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped
    /usr/bin/sparcv9/ps: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, stripped
    /usr/ucb/sparcv7/ps: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped
    And you can use 'truss' to see how this works:
    /usr/ucb/sparcv9/ps: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, stripped
    Note that this feature (isaexec) has nothing specifically to do with /usr/ucb. It's used by any system binary that needs separate versions for 32-bit vs 64-bit to run properly. (truss, p*, uptime, ...)
    2. Are /usr/ubc binaries are part of standared
    solaris distribution?There's only one "Solaris" distribution, so yes. I believe they get installed at the 'user' installation level and above, but you'd have to check on that.
    Darren

  • Bash: /usr/bin/hamachi: No such file or directory

    root@SLR:~$ sudo hamachi  or root@SLR:~$ sudo hamachi startand the output is bash: /usr/bin/hamachi: No such file or directoryI am using installer logmein-hamachi_2.1.0.139-1_armhf.deb OS is Ubuntu Mate (Raspberry PI 2 - Model B)  Ubuntu Software Center says Logmein Hamachi is installed and has an accurate description of the program. I have tried command line install of hamachi and ubuntu package, both install successfully. When I run the 3rd party program, Haguichi, it says hamachi is not installed, but it is! I have confirmed that the hamachi files are in the locations in which they are trying to execute. I have made a clean install of the OS, Ubuntu Mate, running only these commands which worked great with no issues. sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get update
    sudo apt-get install lsb-core
    sudo wget https://secure.logmein.com/labs/logmein-hamachi_2.1.0.139-1_armhf.deb
    sudo dpkg -i logmein-hamachi_2.1.0.139-1_armhf.deb Can someone please suggest what may be causing the issue? Thank you.SLR 

    # uname -a
    Linux isengard 2.6.30-ARCH #1 SMP PREEMPT Sat Jul 4 02:24:43 CEST 2009 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux
    # file /usr/bin/pacman
    /usr/bin/pacman: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
    ya.. thanks, i was guessing it, but dunno how to figure it out. i have no idea why the architecture changed. iam going to recompile packman!
    thanks for your help
    edit:
    when i installed my 32bit system i changed the mirrorlist to 'i686' repository for downloading 32bit things. i forgot to change it again when i was done... so pacman downloaded 32bit stuff and apparently updatet itself.
    Last edited by crabmeat (2009-08-12 11:25:14)

  • -bash: /usr/bin/grep: Bad executable (or shared library)

    I am receiving these error messages when I attempt to use grep, egrep, or fgrep from the terminal:
    -bash: /usr/bin/grep: Bad executable (or shared library)
    -bash: /usr/bin/egrep: Bad executable (or shared library)
    -bash: /usr/bin/fgrep: Bad executable (or shared library)
    I suspect that a library that these utilities use is corrupt, but I am not sure how to determine what libraries the executables use and how to restore them if they are indeed corrupt. Can someone fill me in?
    Thanks,
    Greg
    Dual 2 GHz PowerPC G5   Mac OS X (10.4.7)  

    Hi Greg,
       Sorry, otool is installed by Apple's Developer Tools package. The other listings you posted are also identical to mine so I'm stumped. I also have a G5 so the fact that your items are the same size as mine is at least strong evidence that they aren't corrupted.
       You can use the application Pacifist, to pull a new copy of grep from your Mac OS X install disk. It couldn't hurt to be sure.
       libSystem.B.dylib is in turn dependent on /usr/lib/system/libmathCommon.A.dylib so there's one more possibility for a problem but there the dependency chain stops. Besides, if either of those libraries were corrupted, I would think you would have noticed something before.
       You should check to see if the following environment variable is defined: (it should not be defined)
    echo $DYLDLIBRARYPATH
    You should also login as another user (even if you have to create one temporarily) and execute grep. If that user can do it then the problem lies in the environment of your current user.
    Gary
    ~~~~
       Old Mother Hubbard went to the cupboard
       To fetch her poor daughter a dress.
       When she got there, the cupboard was bare
       And so was her daughter, I guess...

  • I downloaded the new 4.0..I don't like how everything is set up now. How do I get it back how it was set up on the page? Plus my cache doesn't work now.

    I would like to know how to get it back how it was set up for bookmarks, history etc. I don't like how it is set up now.

    If your library was working on your computer and then popped up empty all of a sudden then this might be what you need...
    Empty/corrupt library after upgrade/crash
    Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping. In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.
    See iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.
    When you get it all working make a backup!
    tt2

  • [solved] ssh will only login to /bin/bash

    I have a machine with a few users and an ssh server.
    I would like to setup a user with rbash or nologin for the shell but if i do that, I can't ssh onto that user.
    my /etc/passwd
    zidar:x:1000:100:zidar:/home/zidar:/bin/bash
    smotko:x:1001:1001::/home/smotko:/bin/rbash
    now
    ssh zidar@pc
    su smotko #this works
    # but this doesnt
    ssh smotko@pc # works only if i change the passwd file back to /bin/bash
    this is with my log for ssh with rbash
    Dec 25 03:17:25 arch-dev sshd[636]: Failed password for smotko from 10.0.2.2 port 49075 ssh2
    and same with bash
    Dec 25 03:20:18 arch-dev sshd[678]: Accepted password for smotko from 10.0.2.2 port 49088 ssh2
    and this is how ssh looks with anything other than /bin/bash in /etc/passwd
    $ ssh smotko
    smotko@pc's password:
    Permission denied, please try again.
    password is correct because i can use it locally
    thank you for helping
    Last edited by zidarsk8 (2014-03-14 14:59:17)

    The Arch bash package doesn't actually have the /usr/bin/rbash command.  So not only is this not included in the /etc/shells file, but you are also trying to set the shell to something that doesn't actually exist.  See the RESTRICTED SHELL section of the bash man page. 
    I think wat you are after might be achieveable by simply using 'set' in the given user's startup files.

  • [Solved] How to save a file in /usr/bin/local using gedit as an admin?

    In my attempt to run these two programs:
    https://github.com/kerchen/export_gr2evernote
    https://github.com/spiermar/bookmarks2evernote
    I noticed they assumed the default python is python 2. I have python 3.3.1 and 2.6.8. I'm following the instructions at: https://wiki.archlinux.org/index.php/Py … ld_scripts
    Created a file with this:
    #!/bin/bash
    script=`readlink -f -- "$1"`
    case "$script" in
    /home/Dropbox/export_gr2evernote-master1/*|/home/Dropbox/bookmarks2evernote2/*)
        exec python2 "$@"
    esac
    exec python3 "$@"
    I then, tried to save it as p2 under /usr/local/bin/ where the only thing that's there is meteor, node, and npm, and it throws me an error saying I don't have enough permissions.
    How do I save p2 as an admin in /usr/bin/local using gedit?
    I've searched on the forums 'create a file in /usr/' and I haven't found anything. Can someone please help me?
    Last edited by jjshinobi (2013-04-23 05:20:47)

    jjshinobi wrote:
    sidneyk wrote:
    jjshinobi wrote:
    I moved p2 to bin, edited my projects path with the username in front of home, saved it as python, made it executable (#sudo chmod +x /usr/local/bin/python), removed p2. Ran:
    #python evernote2enex.py -m 10
    It's still referencing python 3...
    "python3: can't open file 'evernote2enex.py': [Errno 2] No such file or directory"
    My python file contains this:
    #!/bin/bash
    script=`readlink -f -- "$1"`
    case "$script" in
    /home/<user>/Dropbox/export_gr2evernote-master1/*|/home/<user>/Dropbox/bookmarks2evernote2/*)
        exec python2 "$@"
    esac
    exec python3 "$@"
    I did everything exactly like the wiki said, what seems to be the problem?
    OK. Looking at the 2 scripts you quoted, neither one is using a shbang line to set a python version to call. Without that, the python intercept doesn't even come into play. The problem that I see is the way you are starting it:
    sudo nano /usr/local/bin/python
    Is root really necessary for these if they are in your /home/<user>/Dropbox/ directory. And it appears that you are assuming python3 when you start them that way. If you are going to use that method and they are indeed python2 scripts, then change your command to this:
    #python evernote2enex.py -m 10
    You might try it as your normal user too in case root isn't really required.
    I tested out the first ten with:
    #python2 export2enex.py -m 10
    it worked!
    then proceded with
    #python2 export2enex.py GStarred -n exported.enex
    The script is fully functional. Thanks man!
    Actually, you're not even using the script when starting your python scripts that way. You are explicitly calling either python3 (python) or python2 (python2) to run the indicated python script and not even touching the work around /usr/local/bin/python script. If your python script started with a line like either :
    #!/usr/bin/env python
    or:
    #!/usr/bin/python
    And was executable, such that you called it by it's name, i.e. "someprogram.py", then the python script in /usr/local/bin/ would take precedence and effectively intercept the python call and choose the appropriate version of python as long as the path to the directory where "someprogram.py" resides is specified in that /usr/local/bin/python script.
    Last edited by sidneyk (2013-04-25 15:40:19)

Maybe you are looking for