On Oct 5, 2014, at 4:21 PM, Nemeth Gyorgy wrote:

> 2014-10-05 19:42 keltezéssel, John Aten írta:
> 
>> I just built bash 4.3.29 from source. I wanted to change my root and one 
>> user account to use it as the default shell. I ran sudo chsh and entered 
>> /usr/local/bin/bash, and everything was fine. I could log in and out, run 
>> commands, and the $SHELL and $BASH_VERSION environment variables confirmed 
>> the change. 
>> 
>> Things got hinky, though when I tried to change my regular, non-root user 
>> account. While logged in as my regular user, I entered chsh, but when I 
>> typed in the path, it says that I had entered an invalid shell. I tried sudo 
>> chsh, and the same. I was perplexed by this, as it seemed perfectly valid 
>> when I ran it as this user by typing the path into the command line of the 
>> previous default shell. Commands run normally, and $BASH_VERSION returns the 
>> right number. I tried to change my regular user's shell again and got the 
>> same error. I triple checked the path, and tried again, this time while 
>> logged in as root. It then returned:
>> 
>> chsh: PAM: Authentication failure
>> 
>> I logged in as root and changed the shell for my regular user account in 
>> /etc/passwd, but after this I couldn't log in to my regular user account at 
>> all. At first it gave me a 'login incorrect' error, but on repeated attempts 
>> it would give what looks like a 10 or 15 line message, but the screen clears 
>> so quickly I can't read it. I logged in as root and changed my regular 
>> user's default shell back to the previous /bin/bash, and now it works fine.
>> 
>> Any thoughts?
> 
> from man chsh:
> "The only restriction placed on the login shell is that the command name
> must be listed in /etc/shells, unless the invoker is the superuser, and
> then any value may be added."
> 
> So put /usr/local/bin/bash into /etc/shells
> 
> Hope, this helps.

I think this will work, but I have since gotten myself into real trouble. At 
some point in my editing of /etc/passwd, I unwittingly deleted the 'r' from the 
entry for root. My first user listed is now 'oot'. I now, of course, cannot do 
anything that relies on the root account. I tried logging in as 'oot' to change 
/etc/passwd, but the I get an 'incorrect login' error. I downloaded the live cd 
image and made a bootable usb stick, but I can only pull up the live system's 
/etc/passwd, not the file for the already installed system. I have poked around 
some and but it doesn't appear to see the HD at all. I tried rebooting from the 
hd and getting the device name with mount or fdisk -l, but when I tried to 
reboot with the usb and mount this device it couldn't find it. How do I get 
access to the installed /etc/passwd ?

--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/f59e7fc0-58a9-4822-a563-2af9e0a45...@gmail.com

Reply via email to