Author Topic: bash-3.00$: to rasputin~$: ?  (Read 17108 times)

0 Members and 3 Guests are viewing this topic.

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: bash-3.00$: to rasputin~$: ?
« Reply #15 on: September 05, 2006, 04:10:31 pm »
No, it has bash.  Notice how I was able to launch it?  I just had ~/.bashrc containing a "link" to /etc/profile on a slackware box, so some things there weren't expected, but here's the output for you anyway:

Code: [Select]
[mullins@grays ~]$ bash
bash-3.00$ exit
exit
[mullins@grays ~]$ which bash; whereis bash
/bin/bash
bash: /bin/bash /usr/local/bin/bash.OBSOLETE /usr/local/bin/bash /usr/share/man/man1/bash.1.gz

Code: [Select]
[mullins@grays ~]$ ypchsh
Changing NIS account information for mullins on bach.cs.colostate.edu.
Please enter password:

Changing login shell for mullins on bach.cs.colostate.edu.
To accept the default, simply press return. To use the
system's default shell, type the word "none".
Login shell [/usr/local/bin/tcsh]: none
Error while changing the login shell.
The login shell has not been changed on bach.cs.colostate.edu.

I don't think I have access to change it.  Maybe I can just launch bash when I first log in?

Edit: seems to work fine doing that.  I just have to type "exit" twice. >_>

Code: [Select]
sidoh@muaddib:~$ ssh mullins@grays
mullins@grays's password:
Last login: Tue Sep  5 14:20:54 2006 from inge068209.halls.colostate.edu

+-----------------------------------------------------------------------------+
| For system policies, information, and answers to frequently asked questions |
| see:                                                                        |
|                                                                             |
|       http://www.cs.colostate.edu/~info/faq.html                            |
|                                                                             |
| To report systems problems or to request the recovery of accidentally
| deleted files, see:
|                                                                             |
|       http://www.cs.colostate.edu/cgi-bin/trouble.pl
|                                                                             |
| Use /usr/local/bin/npasswd to change your password.  (The old commands,     |
| passwd and yppasswd, have been disabled.)                                   |
+-----------------------------------------------------------------------------+

mullins@grays:~$ echo $SHELL
/bin/bash
mullins@grays:~$ cat ~/.cshrc
/bin/bash
mullins@grays:~$ grep "/bin/bash" ~/profile
export SHELL="/bin/bash"
« Last Edit: September 05, 2006, 04:23:21 pm by Sidoh »

Offline nslay

  • Hero Member
  • *****
  • Posts: 786
  • Giraffe meat, mmm
    • View Profile
Re: bash-3.00$: to rasputin~$: ?
« Reply #16 on: September 05, 2006, 04:31:28 pm »
No, it has bash.  Notice how I was able to launch it?  I just had ~/.bashrc containing a "link" to /etc/profile on a slackware box, so some things there weren't expected, but here's the output for you anyway:

Code: [Select]
[mullins@grays ~]$ bash
bash-3.00$ exit
exit
[mullins@grays ~]$ which bash; whereis bash
/bin/bash
bash: /bin/bash /usr/local/bin/bash.OBSOLETE /usr/local/bin/bash /usr/share/man/man1/bash.1.gz

Code: [Select]
[mullins@grays ~]$ ypchsh
Changing NIS account information for mullins on bach.cs.colostate.edu.
Please enter password:

Changing login shell for mullins on bach.cs.colostate.edu.
To accept the default, simply press return. To use the
system's default shell, type the word "none".
Login shell [/usr/local/bin/tcsh]: none
Error while changing the login shell.
The login shell has not been changed on bach.cs.colostate.edu.

I don't think I have access to change it.  Maybe I can just launch bash when I first log in?

Edit: seems to work fine doing that.  I just have to type "exit" twice. >_>

Code: [Select]
sidoh@muaddib:~$ ssh mullins@grays
mullins@grays's password:
Last login: Tue Sep  5 14:20:54 2006 from inge068209.halls.colostate.edu

+-----------------------------------------------------------------------------+
| For system policies, information, and answers to frequently asked questions |
| see:                                                                        |
|                                                                             |
|       http://www.cs.colostate.edu/~info/faq.html                            |
|                                                                             |
| To report systems problems or to request the recovery of accidentally
| deleted files, see:
|                                                                             |
|       http://www.cs.colostate.edu/cgi-bin/trouble.pl
|                                                                             |
| Use /usr/local/bin/npasswd to change your password.  (The old commands,     |
| passwd and yppasswd, have been disabled.)                                   |
+-----------------------------------------------------------------------------+

mullins@grays:~$ echo $SHELL
/bin/bash
mullins@grays:~$ cat ~/.cshrc
/bin/bash
mullins@grays:~$ grep "/bin/bash" ~/profile
export SHELL="/bin/bash"

I know FSU requires us to email the Help Desk to have our shell changed.  Maybe you have to request a shell change from some authority too?
An adorable giant isopod!

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: bash-3.00$: to rasputin~$: ?
« Reply #17 on: September 05, 2006, 04:38:00 pm »
I would imagine so, but this seems to be a valid workaround for now?

Offline nslay

  • Hero Member
  • *****
  • Posts: 786
  • Giraffe meat, mmm
    • View Profile
Re: bash-3.00$: to rasputin~$: ?
« Reply #18 on: September 05, 2006, 04:39:40 pm »
I would imagine so, but this seems to be a valid workaround for now?
Yeah, that works, have tcsh execute bash on startup
An adorable giant isopod!

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: bash-3.00$: to rasputin~$: ?
« Reply #19 on: September 05, 2006, 07:01:19 pm »
I don't know if it works on tcsh, but try running "exec bash" -- exec, if it works, replaces the current running process (ie, tcsh) with the new one (bash), so you only have to exit once.

Offline nslay

  • Hero Member
  • *****
  • Posts: 786
  • Giraffe meat, mmm
    • View Profile
Re: bash-3.00$: to rasputin~$: ?
« Reply #20 on: September 05, 2006, 07:13:43 pm »
Sidoh, I noticed on the motd that they have you use /usr/local/bin/npasswd to change the password.  Perhaps there is a /usr/local/bin/nchsh?
An adorable giant isopod!

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: bash-3.00$: to rasputin~$: ?
« Reply #21 on: September 05, 2006, 07:24:18 pm »
Now my only problem is that it doesn't show # when I su to root :(

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: bash-3.00$: to rasputin~$: ?
« Reply #22 on: September 05, 2006, 08:20:03 pm »
Sidoh, I noticed on the motd that they have you use /usr/local/bin/npasswd to change the password.  Perhaps there is a /usr/local/bin/nchsh?

Don't think so :(

Code: [Select]
mullins@grays:~$ ls /usr/local/bin/nchsh
ls: /usr/local/bin/nchsh: No such file or directory
mullins@grays:~$ whereis nchsh
nchsh:

I don't know if it works on tcsh, but try running "exec bash" -- exec, if it works, replaces the current running process (ie, tcsh) with the new one (bash), so you only have to exit once.

Code: [Select]
sidoh@muaddib:~$ ssh mullins@grays
mullins@grays's password:
Last login: Tue Sep  5 18:18:30 2006 from inge068209.halls.colostate.edu

+-----------------------------------------------------------------------------+
| For system policies, information, and answers to frequently asked questions |
| see:                                                                        |
|                                                                             |
|       http://www.cs.colostate.edu/~info/faq.html                            |
|                                                                             |
| To report systems problems or to request the recovery of accidentally
| deleted files, see:
|                                                                             |
|       http://www.cs.colostate.edu/cgi-bin/trouble.pl
|                                                                             |
| Use /usr/local/bin/npasswd to change your password.  (The old commands,     |
| passwd and yppasswd, have been disabled.)                                   |
+-----------------------------------------------------------------------------+

mullins@grays:~$ cat ~/.cshrc
exec /bin/bash
mullins@grays:~$ exit
exit
Connection to grays closed.

Excellent!  Thanks much, iago!

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: bash-3.00$: to rasputin~$: ?
« Reply #23 on: September 06, 2006, 10:58:02 pm »
Haha.  When I got to class today, I logged into the same Linux box I was SSH'ing (grays, as you might have guessed) and FC4 bombed right after logging in.  At first, I thought my account was disabled for some strange reason and I was all freaked out.  About two seconds after that, though, I realized I was messing around with this last night.  I just replaced ~/.cshrc with the backup of the old one I made and appended it with exec /bin/bash and it works great.  :)  I feel sorry for all of the suckers typing pwd.  What's the advantage csh has over bash?

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: bash-3.00$: to rasputin~$: ?
« Reply #24 on: September 06, 2006, 11:30:36 pm »
What's the advantage csh has over bash?

As far as syntax, there isn't much. There are a few different built-in commands (man builtin I think...) but the syntax is the big difference.
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: bash-3.00$: to rasputin~$: ?
« Reply #25 on: September 06, 2006, 11:36:10 pm »
I don't know, but a lot of people love csh.  I seem to remember Tmp saying he likes it.   

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: bash-3.00$: to rasputin~$: ?
« Reply #26 on: September 06, 2006, 11:43:15 pm »
By the way, if you wanted to use bash because it shows a directory in the prompt... you can do that to the prompt in csh too. :P
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: bash-3.00$: to rasputin~$: ?
« Reply #27 on: September 06, 2006, 11:49:03 pm »
As far as syntax, there isn't much. There are a few different built-in commands (man builtin I think...) but the syntax is the big difference.

I know the syntax is different.  I was wondering if there were significant differences in performance, robustness, etc.

I don't know, but a lot of people love csh.  I seem to remember Tmp saying he likes it.  

Every computer in the Linux labs here uses it.  There must be something...

By the way, if you wanted to use bash because it shows a directory in the prompt... you can do that to the prompt in csh too. :P

I want this to work with ssh too.  I don't think that will work with it?  I found their login script (it's ~/.cshrc), and the variable defining the prompt syntax (set prompt=""). Do I need to fix that? :P

I'd love to switch to bash, since that's what I'm familiar with.  I've tried to use for, do, etc a few times and it throws errors!  Is there a way to change it for one user?

:P

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: bash-3.00$: to rasputin~$: ?
« Reply #28 on: September 07, 2006, 09:14:39 pm »
I'd love to switch to bash, since that's what I'm familiar with.  I've tried to use for, do, etc a few times and it throws errors!  Is there a way to change it for one user?

Excuse me for suggesting inefficiency here, but since ~/.cshrc is in your ~ directory, you could edit that for yourself. If I understand correctly, shells have no problem running shells on top of themselves. For example, in bash, you can type csh to run csh. The same principle can be reversed to run bash over csh, no?
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: bash-3.00$: to rasputin~$: ?
« Reply #29 on: September 07, 2006, 09:22:43 pm »
Excuse me for suggesting inefficiency here, but since ~/.cshrc is in your ~ directory, you could edit that for yourself. If I understand correctly, shells have no problem running shells on top of themselves. For example, in bash, you can type csh to run csh. The same principle can be reversed to run bash over csh, no?

Read the rest of the topic.