changing shell
Hi, I'm trying to get my shell changed from the default csh to bash. I followed the instruction in the handbook, chsh -s /usr/local/bin/bash beni and got the reply that the user information was updated : [EMAIL PROTECTED]:/home/beni chsh -s /usr/local/bin/bash beni chsh: user information updated [EMAIL PROTECTED]:/home/beni Did the same for root. Looked with vipw and my shell was changed to bash. My /etc/shells was also modified : [EMAIL PROTECTED]:~ cat /etc/shells # $FreeBSD: src/etc/shells,v 1.5 2000/04/27 21:58:46 ache Exp $ # # List of acceptable shells for chpass(1). # Ftpd will not allow users to connect who are not using # one of these shells. /bin/sh /bin/csh /bin/tcsh /usr/local/bin/bash [EMAIL PROTECTED]:~ But when logging out and back in again, the shell didn't change to bash. It's still csh... I just get the %-sign and have to type bash to get the bash-shell in a console. And the weird thing is with path : %echo $path /sbin /bin /usr/sbin /usr/local/bin /usr/games /usr/local/sbin /usr/bin /usr/X11R6/bin /home/beni/bin % [EMAIL PROTECTED]:~ echo $path [EMAIL PROTECTED]:~ Any hints on the why of this ? -- Beni. pgpmAMPLnopLb.pgp Description: PGP signature
Re: changing shell
On Sunday 11 December 2005 22:07, FreeBsdBeni wrote: Hi, I'm trying to get my shell changed from the default csh to bash. I followed the instruction in the handbook, chsh -s /usr/local/bin/bash beni and got the reply that the user information was updated : [EMAIL PROTECTED]:/home/beni chsh -s /usr/local/bin/bash beni chsh: user information updated [EMAIL PROTECTED]:/home/beni Did the same for root. Looked with vipw and my shell was changed to bash. My /etc/shells was also modified : [EMAIL PROTECTED]:~ cat /etc/shells # $FreeBSD: src/etc/shells,v 1.5 2000/04/27 21:58:46 ache Exp $ # # List of acceptable shells for chpass(1). # Ftpd will not allow users to connect who are not using # one of these shells. /bin/sh /bin/csh /bin/tcsh /usr/local/bin/bash [EMAIL PROTECTED]:~ But when logging out and back in again, the shell didn't change to bash. It's still csh... I just get the %-sign and have to type bash to get the bash-shell in a console. And the weird thing is with path : %echo $path /sbin /bin /usr/sbin /usr/local/bin /usr/games /usr/local/sbin /usr/bin /usr/X11R6/bin /home/beni/bin % [EMAIL PROTECTED]:~ echo $path [EMAIL PROTECTED]:~ Any hints on the why of this ? Try: pw user mod beni -s /usr/local/bin/bash -- Regards , Vasile C If UNIX doesn't have the solution you have the wrong problem. UNIX is simple, but it takes a genius to understand it's simplicity. pgpuZUuRZMkIq.pgp Description: PGP signature
Re: changing shell
On Sunday 11 December 2005 03:17, Vasile C wrote: On Sunday 11 December 2005 22:07, FreeBsdBeni wrote: Hi, I'm trying to get my shell changed from the default csh to bash. I followed the instruction in the handbook, chsh -s /usr/local/bin/bash beni and got the reply that the user information was updated : [EMAIL PROTECTED]:/home/beni chsh -s /usr/local/bin/bash beni chsh: user information updated [EMAIL PROTECTED]:/home/beni Did the same for root. Looked with vipw and my shell was changed to bash. My /etc/shells was also modified : [EMAIL PROTECTED]:~ cat /etc/shells # $FreeBSD: src/etc/shells,v 1.5 2000/04/27 21:58:46 ache Exp $ # # List of acceptable shells for chpass(1). # Ftpd will not allow users to connect who are not using # one of these shells. /bin/sh /bin/csh /bin/tcsh /usr/local/bin/bash [EMAIL PROTECTED]:~ But when logging out and back in again, the shell didn't change to bash. It's still csh... I just get the %-sign and have to type bash to get the bash-shell in a console. And the weird thing is with path : %echo $path /sbin /bin /usr/sbin /usr/local/bin /usr/games /usr/local/sbin /usr/bin /usr/X11R6/bin /home/beni/bin % [EMAIL PROTECTED]:~ echo $path [EMAIL PROTECTED]:~ Any hints on the why of this ? Try: pw user mod beni -s /usr/local/bin/bash hey, that worked ! Thanks. -- Beni. pgpAJOHYEHRiK.pgp Description: PGP signature
Re: changing shell
FreeBsdBeni wrote: [EMAIL PROTECTED]:/home/beni chsh -s /usr/local/bin/bash beni chsh: user information updated [EMAIL PROTECTED]:/home/beni This should work if you are truly root, as the prompt suggests. If you are not, then you need to modify /etc/shells to include bash before invoking chsh. [EMAIL PROTECTED]:~ echo $path [EMAIL PROTECTED]:~ Any hints on the why of this ? When not invoked as a login shell, bash does not read /etc/profile or ~/.profile. -- James Bailie [EMAIL PROTECTED] http://www.jamesbailie.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: no root login after changing shell
What about the toor user? I think it has no shell associated. Hope that helps. bye. -- Hi, i wanted to change the shell for user root to bash. in the freebsd online handbook i found this command: ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: no root login after changing shell
On Wednesday 27 August 2003 10:24 pm, m wrote: What about the toor user? I think it has no shell associated. Hope that helps. bye. Unless he has already changed toor's password (which a lot of people don't even know about) he won't be able to log in as toor. This is my newbie understanding of toor anyway. -- Todd Stephens ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: no root login after changing shell
What about the toor user? I think it has no shell associated. Hope that helps. bye. -- Hi, i wanted to change the shell for user root to bash. in the freebsd online handbook i found this command: Don't set a password on the real root account or log in to it. For some little measure of safety, leave it starred '*' out. Just make your own root account if it is your machine and you will have the ability to have a root account.Use 'vipw' to edit the passwd file - it also updates master.passwd when you exit and write changes. Copy the entry for toor and replace the username and the information fields and the home directory and shell fields. Then set a password for this account and create the home directory and make sure the shell is in /etc/shells. The gory details in an example: Lets say your name is Clyde. - Make yourself root - either su, or go to single user and mount everything or whatever. - use vipw to edit the passwd file. Make a copy of the toor entry (Don't modify toor itself for reasons of cleanness and to avoid possible problems (unlikely nowdays, but) during upgrades. NOTE: Fields in the passwd file are separated with a colon (:). - then edit the _copy_ to change the username field from toor to Rclyde - Leave the uid and gid fields the same. - Modify the field that says something like 'Bourne-again Superuser' to say something like 'Clyde root account' (just for information) - modify the home(login) directory field that says /root to be /root/Rclyde - add /usr/local/bin/bash or whatever shell you want after the last (:) NOTE: Do not add another colon (:) after the shell field - write changes and exit the editor ':wq' - set a password for Rclyde 'passwd Rclyde' - make sure you include the username Rclyde because otherwise you will set the real root's password. - Create the home directory for Rclyde'mkdir /root/Rclyde' - use some editor, probably vi to edit /etc/shells and make sure that /usr/local/bin/bash is listed. Now you should be able to log in as Rclyde with a root ability account and have bash as your shell and not skrew up root's shell which should stay /bin/sh for those times it is needed, as in when you are cleaning up some mess that can only be done in single user with none of the other filesystems mounted. You can also set up a nice convenient environment with .login, .bashrc, .cshrc, etc depending on shell and what you like, that suits you and doesn't make the real root requite stuff that might not be available when you are cleaning up messes in single user. NOTE: I don't use bash and haven't installed it, so if it installs somewhere other than /usr/local/bin/bash, make sure you use that instead of what I put in this example. jerry ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: no root login after changing shell
- Original Message - From: Charles Howse [EMAIL PROTECTED] To: 'thomas may' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 4:57 PM Subject: RE: no root login after changing shell i wanted to change the shell for user root to bash. in the freebsd online handbook i found this command: # echo /usr/local/bin/bash /etc/shells but what i didnt know at this moment, that i have to install bash before. so i logged of as user root and get now on login the following error: su: /usr/local/bin/bash: No such file or directory can anybody please help me ... thanx Type 'boot -s' at the 10 second count down to boot to single user mode, it should ask you for the shell you want to use I think, the default being /bin/sh so you should be able to hit enter. You'll have to mount your partitions read/write, something like `mount -rw /`, if /usr is a seperate partition I think you will also need to mount this for vi and such... you should then be able to type `chsh -s /bin/tcsh` (on second thoughts maybe you don't need vi for this) to change the shell for root back, reboot and login (unless I missed something out) :o) ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: no root login after changing shell
i wanted to change the shell for user root to bash. in the freebsd online handbook i found this command: # echo /usr/local/bin/bash /etc/shells but what i didnt know at this moment, that i have to install bash before. so i logged of as user root and get now on login the following error: su: /usr/local/bin/bash: No such file or directory can anybody please help me ... thanx Been there, done that, I sympathize with you. The proper way to have done that would be: Install bash As root, type chsh That will open vi, or your configured editor. Then change the shell line to: /usr/local/bin/bash Alternately, you can, as root, type: Chpass -s /usr/local/bin/bash root This aviods opening vi and the editing I mentioned above. As far as recovering from this problem, I'm kinda a newbie myself, when I did that, I finally re-installed. Maybe someone can point you to the easy way to fix it. Reboot the machine. At the `boot:' prompt do : boot -s When it asks for a shell accept /bin/sh (or specify it) Mount all OS partitions (e.g. `mount -a -t ufs') Fix the password file. (us vipw if you can) reboot. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: no root login after changing shell
thomas may wrote: Hi, i wanted to change the shell for user root to bash. This is not a good idea. You don't want to use a shell on a partition other than / (e.g. /usr, /usr/local) for root. If those partitions, or shared libraries like libc, get trashed, you are in a world of pain. Much better is to continue to use /bin/sh (or whatever other statically-linked shell takes your fancy) by default. Then, when you want the comfort of bash, all you have to do is run exec bash from the command line and voila! you're using bash. This is how all my servers are set up. 10 keystrokes is a small price to pay for peace of mind. David ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]