Page 2 of 7

Re: Shell server adjustments

Posted: Thu Feb 25, 2021 5:32 am
by nhdesign
Good morning Scott,

I am able to log in but my dot files are not working.

$
_[/home2/02/32/nhdesign]_(nhdesign@sh)_
$ source .login
-sh: source: .login: file not found
_[/home2/02/32/nhdesign]_(nhdesign@sh)_
$

I can vi .login
ls -a display all my files are present

Re: Shell server adjustments

Posted: Thu Feb 25, 2021 6:28 am
by scott
nhdesign wrote:Good morning Scott,

I am able to log in but my dot files are not working.

$
_[/home2/02/32/nhdesign]_(nhdesign@sh)_
$ source .login
-sh: source: .login: file not found
_[/home2/02/32/nhdesign]_(nhdesign@sh)_
$

I can vi .login
ls -a display all my files are present
Taking a look ...

Edit: Yep, their /bin/tcsh shell got flipped back to the default /bin/sh. If anybody else notices their shell getting reset to the default from whatever {valuable,exotic,etc} shell you like to login with, post here or email shellmaster@sonic.net to get your shell reset to the proper value. (We have to run chsh with the current setup, there's no working chsh on the shell server. Maybe there should be.)

Edit edit: Man, that looks harsh on second reading. Sorry for the terseness. No worries, it's all good. :)

Re: Shell server adjustments

Posted: Thu Feb 25, 2021 11:32 am
by mball
Oh, my shell!

Used to be tcsh.
Now it's /bin/sh.
Please chsh for me.

Also, remind me how to see my passwd entry in an environment where it is stored on some server somewhere.

Re: Shell server adjustments

Posted: Thu Feb 25, 2021 2:12 pm
by scott
mball wrote:Oh, my shell!

Used to be tcsh.
Now it's /bin/sh.
Please chsh for me.

Also, remind me how to see my passwd entry in an environment where it is stored on some server somewhere.
It's fixed, please log out and log back in for it to take effect for your next session.

To get at the system databases, use getent like this:
$ getent passwd mball
mball:(passwd entry is printed)

-Scott

Re: Shell server adjustments

Posted: Mon Mar 01, 2021 8:02 am
by nhdesign
Is it safe to write these two files to accomplish the same thing by overriding what etc passwd has set?


-----------------------------------------------------------------
#.bash_profile
#20210225

source $HOME/.profile



-----------------------------------------------------------------
#.profile
#20210225

# export SHELL=`which tcsh`
# [ -z "$TCSH_VERSION" ] && exec "$SHELL" -l

SHELL=`type -P tcsh`
exec tcsh -l

source .login
source .cshrc

-----------------------------------------------------------------

Re: Shell server adjustments

Posted: Tue Mar 02, 2021 12:35 am
by scott
nhdesign wrote:Is it safe to write these two files to accomplish the same thing by overriding what etc passwd has set?


-----------------------------------------------------------------
#.bash_profile
#20210225

source $HOME/.profile



-----------------------------------------------------------------
#.profile
#20210225

# export SHELL=`which tcsh`
# [ -z "$TCSH_VERSION" ] && exec "$SHELL" -l

SHELL=`type -P tcsh`
exec tcsh -l

source .login
source .cshrc

-----------------------------------------------------------------
That should work, except that the last two "source" statements will never execute. (When you exec tcsh, it replaces the current process.)

I would like to point out that it is highly unlikely that we will change your shell in the future, this was a very unusual circumstance, of which the conditions have now been removed. Shouldn't happen again.

Re: Shell server adjustments

Posted: Fri Mar 05, 2021 11:16 am
by khegel
Hello, would you mind changing my default shell to zsh? Thanks!

Re: Shell server adjustments

Posted: Sun Mar 07, 2021 1:31 am
by scott
khegel wrote:Hello, would you mind changing my default shell to zsh? Thanks!
Sure.
BTW folks, looks like we have tech support able to change shells now. :)
-Scott

Re: Shell server adjustments

Posted: Mon Mar 15, 2021 5:31 pm
by sls123
Where the hell did my home directory go? Another reboot 25 minutes ago and my
files are all gone. I am unable to connect to the irc server; it closes the connection.

[sls123@sh ~]$ echo $HOME
/home2/01/39/sls123
[sls123@sh ~]$ ls -l $HOME
total 0
[sls123@sh ~]$ ls -ltra $HOME
total 4
drwxr-xr-x. 3 root root 20 Feb 25 01:29 ..
drwxr-xr-x. 2 sls123 user 22 Mar 15 17:23 .
-rw-------. 1 sls123 user 433 Mar 15 17:28 .history
[sls123@sh ~]$

Re: Shell server adjustments

Posted: Mon Mar 15, 2021 6:31 pm
by sls123
My home directory appears to be back. There was nothing in the MOTD about expecting interruption in access to home directory.