LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-13-2024, 04:33 PM   #1
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Rep: Reputation: 8
Strange problem during logout from Ubuntu


Below telnet session of login/logout from Mageia tu Ubuntu

Code:
[maciek@Piotr ~]$ telnet nano
Trying 192.168.0.25...
Connected to nano.
Escape character is '^]'.
Ubuntu 16.04.7 LTS
NanoPi-NEO login: nano
Password: 
nano@NanoPi-NEO:~$ ls -la
total 36
drwxr-xr-x 4 nano nano 4096 lut 13 00:58 .
drwxr-xr-x 5 root root 4096 lut 12 00:41 ..
-rw------- 1 nano nano  502 lut 13 01:47 .bash_history
-rw-r--r-- 1 nano nano  220 wrz  1  2015 .bash_logout
-rw-r--r-- 1 nano nano 3771 wrz  1  2015 .bashrc
drwx------ 2 nano nano 4096 lut 12 00:47 .cache
-rw-rw-r-- 1 nano nano    0 lut 13 00:31 .hushlogin
-rw-r--r-- 1 nano nano  655 cze 24  2016 .profile
drwx------ 2 nano nano 4096 sie 18  2022 .ssh
-rw-r--r-- 1 nano nano    0 lut 13 00:32 .sudo_as_admin_successful
-rw------- 1 nano nano  782 lut 12 23:53 .viminfo
nano@NanoPi-NEO:~$ logout
mount: only root can use "--options" option
Connection closed by foreign host.
As you can see, during logout the "mount" command signals an error.
The problem is that none of the files in the user's home directory (which are listed) contain the "mount" command.
So it must be something globally defined.
The problem does not occur during SSH sessions, only during TELNET sessions.
Does anyone out there know the reason? Any idea?

I explain that I use telnet daemon on Ubuntu installed on RPi because it is a "last resort solution" for me. I normally use SSH.
The system is installed on eMMC (not on SD-card) and once I damaged the SSH configuration, which made it impossible to log in to the system.So I had to reinstall the system
 
Old 02-14-2024, 10:42 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,579
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
What does .bash_logout contain?
 
Old 02-14-2024, 10:43 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
probably different init scripts are used with telnet and ssh.
There is a .bash_logout, probably you can find something related in it.
 
1 members found this post helpful.
Old 02-14-2024, 03:35 PM   #4
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
Below content of .bash_logout file:

Code:
root@NanoPi-NEO:/home/nano# cat .bash_logout 
# ~/.bash_logout: executed by bash(1) when login shell exits.

# when leaving the console clear the screen to increase privacy

if [ "$SHLVL" = 1 ]; then
    [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi
I deleted the .bash_logout file but this strange message with "mount" still appears.
This file was created automatically during creation of user using /etc located defaults.

Last edited by mackowiakp; 02-14-2024 at 03:48 PM.
 
Old 02-15-2024, 12:36 AM   #5
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,796

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
Is there a
/etc/bash.bash_logout
at the remote side?
Is there a
.telnetrc
at the local side?
 
1 members found this post helpful.
Old 02-15-2024, 01:11 AM   #6
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
Quote:
Is there a
/etc/bash.bash_logout
at the remote side?
Yes

Quote:
s there a
.telnetrc
at the local side?
No
 
Old 02-15-2024, 01:28 AM   #7
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,579
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
What does the remote /etc/bash.bash_logout contain?
 
1 members found this post helpful.
Old 02-15-2024, 01:34 AM   #8
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
OMG !!!

Code:
root@NanoPi-NEO:~# cat /etc/bash.bash_logout 
/bin/mount -o remount,ro /boot
 
Old 02-15-2024, 04:14 AM   #9
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,796

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
Provided that mount command ever makes sense,
move it to root's .bash_logout
 
1 members found this post helpful.
  


Reply

Tags
logout, mount, telnet



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Background Colors after Logout / Standby Herrmann_872 Debian 4 04-19-2018 11:30 PM
Squid exclude Coovachilli logout url http://logout tatanna Linux - Networking 0 07-18-2012 02:48 AM
xscreensaver: strange error after logout theCapitain Slackware 4 08-21-2010 05:50 PM
Strange problem: running XINE causes logout chem1 Linux - Software 3 03-25-2004 12:50 PM
On gnome / x logout run "logout" ?? once here Linux - Software 1 01-09-2004 02:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration