Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
-1 votes
0 answers
32 views

Ubuntu Login Loop because of $PATH problems

I need your help. I'm stuck with the Ubuntu Login Loop and I guess, it happened because I tried to add the PATH for Laravel to .bashrc. This went wrong and now I tried a lot to put into .bashrc, ....
Rastatux's user avatar
2 votes
1 answer
513 views

non-login shell sources $HOME/[.local/]bin to $PATH and I can't find why

OS: Ubuntu Desktop 22.04 I am initially logged in as user carl. I open a shell and echo $0, I get the confirmation that I am in a non-login shell. ("bash", no dash) But when I then echo $...
nocarea's user avatar
  • 23
0 votes
1 answer
124 views

Not at home after login

I have installed Ubuntu 22.04 in WSL2. I expect that the bash shall be started in the home directory that I find in /etc/passwd as harper:x.1000:1000:,,,,:/home/harper:/bin/bash But after starting ...
harper's user avatar
  • 113
2 votes
0 answers
110 views

Custom modt script prevents me from logging in on server. Am I doing something wrong?

I am running Ubuntu 22.04 LTS Server on an old computer I have, and I would like to have a custom script be run when I login to print useful information. I have the script (linked below), placed it in ...
dazzmos's user avatar
  • 21
1 vote
0 answers
69 views

how to perform commands from the "login shell"

I noticed that several programs (ie webstorm) run with their own manager, and thus through the login shell (running through the jetbrains toolbox to manage versions and updates smoothly), which I ...
paul23's user avatar
  • 381
0 votes
0 answers
135 views

Error found then loading /etc/profile

An error was encountered while loading /etc/profile: tr: symbol lookup error: tr: undefined symbol: waiting, version GLIBC_2.2.5 The result of the session will be the wrong mood. You need to fix the ...
Максим Москвичев's user avatar
0 votes
0 answers
308 views

How to change default $PATH for root user in WSL2 (Ubuntu version)

In the Ubuntu version running in WSL2 (on Windows 11), how do you change the default $PATH for the root user? I've tried adding the following lines to the root user's ".profile" script: if [ ...
Greg Dolley's user avatar
0 votes
1 answer
1k views

.profile not read anymore after upgrade to 22.04. How to debug?

Yesterday I upgraded my desktop to 22.04.1. Somehow my custom commands in ~/bin/ are not found anymore. It seems I have to manually source .profile in every terminal. Yes, I have a manually created ....
Janghou's user avatar
  • 5,799
1 vote
0 answers
582 views

Start KeePassXC on unprotected PC without password on boot

I have a laptop at my home and I have no password at startup. I also have gnome keyring autologin enabled. The only thing that really bugs me, is that I need to enter my 40 character password for ...
Adam's user avatar
  • 2,520
1 vote
1 answer
312 views

Change password via BASH script using UID

I've created a post-installation automation BASH script for Ubuntu installations. The last thing I want the script to do, is to set the password of UID 1000's password (the user I've created while ...
Pinguinim's user avatar
  • 1,478
10 votes
1 answer
2k views

when you login to the shell, what program handles evaluation of the credentials?

when you first boot, and you're greeted with the warm glow of a black screen and flashing prompt, what program is that? What program handles evaluation of the credentials? Or rather, what component of ...
j0h's user avatar
  • 14.9k
2 votes
1 answer
1k views

Is there a default way to run commands on user's logout?

I want to log the logins/logouts of my users. For the logins I only need to modify /etc/profile and add my command or edit any .profile for an specific user. But for the logouts I don't know if there ...
raultm's user avatar
  • 121
0 votes
1 answer
103 views

Scheduling tasks a certain amount of time after login

I have written a python program that reads from email. If a certain string is received from email then it does nothing. But if the python program does not receive that string, it runs a bash script, ...
Anusheen Nema's user avatar
4 votes
3 answers
3k views

How can I view the stdout / stderr from the bash login shell?

I'm trying to debug a strange issue with my ~/.bash_profile, and I'd like to be able to see if there are any errors / etc printed when it's run. Is there some log or such somewhere that contains the ...
Paul Molodowitch's user avatar
2 votes
1 answer
179 views

Wrong logname at login in Ubuntu 21.10

I upgraded my Ubuntu 21.04 to 21.10 yesterday and am running into serious problems after rebooting. Troubles with graphical drivers (solved) This is solved, but maybe I broke something by solving this ...
Amael H.'s user avatar
0 votes
1 answer
113 views

Unable to login to desktop 20.04

I cannot login to Ubuntu 20.04 after installation of zsh-shell I added an exec zsh on top of my .bashrc file to change my default terminal to make zsh my default shell. On reboot, I couldn't log in.On ...
Felix Orinda's user avatar
0 votes
1 answer
689 views

login shell check is not working in .profile

Ubuntu 20.04, 5.8.0-63-generic, gnome-shell, gdm3 My login shell is set to /bin/sh and I have this line in my $HOME/.profile file: shopt -q login_shell > /dev/null 2>&1 || export SHELL=/bin/...
Sayan Dey's user avatar
  • 238
2 votes
2 answers
3k views

Lubuntu 20.04 Run a script at login which executes in a terminal window

My Goal: Execute a shell script after login which runs with root privileges and takes the appropriate user input from a terminal window to determine its next course of action. The Script: The script I'...
XXX_BlueFire_XXX's user avatar
0 votes
0 answers
582 views

Ubuntu 20.04.2 login loop due to segmentation fault in libpcre.so.3.13.3

Out of sudden I got this login loop issue in my laptop. From var/log/syslog I can able to find out it is segfault issue gnome-session-b[2739]: segfault at 7ffe34d8xx50 ip 00007ffe34d8dxxx error 6 in ...
learner's user avatar
0 votes
1 answer
469 views

Cannot login 20.04 LTS login loop

I am using Ubuntu 20.04. I can now no longer login to my machine. Attempting to login will make the screen go black, and then I get thrown back to the purple login screen. This is the timeline of the ...
Matthew Naybour's user avatar
0 votes
1 answer
1k views

Can you run a login shell in Xterm?

I'm trying to get a hold of all the interactive/non-interactive login/non-login shells types, and I have a little question to help me put this puzzle together: I understand that when you e.g. login to ...
YoavKlein's user avatar
  • 125
4 votes
3 answers
2k views

Which bash profile file should I use for each scenario?

I have seen many detailed explanations on how .bashrc, .bash_profile and the various other profile files interact, so I'm not after an explanation of how they fit together (I've read many such ...
YorSubs's user avatar
  • 323
0 votes
0 answers
128 views

Login and password on script

I need your help to creat a script for my company , the script must execute a bin script by a command line, once it launches the command the service asks for a login and a password, after this step ...
sef ayoub's user avatar
1 vote
1 answer
392 views

How to change keyboard layout for each user?

I am setting up user accounts for family members on my laptop. I use Dvorak (by touch type) but they will all use QWERTY. How can I set each user to have a different keyboard layout?
Johnny Rollerfeet's user avatar
2 votes
0 answers
441 views

How to make a script execute on failed physical login?

So I have setup the PAM for my laptop in such way that if there is a failed login attempt, a bash script is executed by which webcam takes a shot and on three consecutive failed login attempts a siren ...
user avatar
1 vote
1 answer
833 views

LightDM: How can I trigger a bash command everytime someone fail to login?

I'd like to take and save a picture from the webcam, every time someone tries to login into the system and fails. I know I can do that with: mplayer -vo png -frames 1 tv:// The question is: How can ...
Adrian Lopez's user avatar
1 vote
0 answers
72 views

How to find out which shell is asking for super user login?

I am running Ubuntu 18.04. Since a few weeks, whenever I start my PC, there is a window popping up and asking my password with this message : It is neccessary to authenticate so that /bin/sh can be ...
Yves Nicolas's user avatar
1 vote
0 answers
200 views

Is `.bashrc` executed when ubuntu 18 logging in?

I added a line at the beginning of .bashrc which is: exit No terminal will be opened (the usual way), but Ubuntu 18.04 never been able to log in (to the user interface). I was able to log in later by ...
Yasin Yousif's user avatar
-1 votes
1 answer
1k views

Run command automatically on login [duplicate]

I have a command to run a python program. I do not want to run this command manually after login, I want this command should run automatically after I logged in to my ubuntu. I am using Ubuntu 16.04. ...
Asad Javed's user avatar
0 votes
1 answer
348 views

bash_login file

I read somewhere, I should be able to find .bash_login file in my home directory. Well, I cannot find it. Where could be the problem ? I have only these files :
John Ronald's user avatar
  • 1,896
1 vote
0 answers
405 views

How to simulate logging via login screen in ubuntu 16.04 desktop/server from terminal

Some ubuntu commands need a user to have been logged in via the login screen. Example is: running pacmd list-sink-inputs from the terminal without the user first logged in via the login screen would ...
eddys's user avatar
  • 139
1 vote
1 answer
1k views

how to lock login terminal on a server

is there a way to lock a login console of a server after a certain time of inactivity? just lock; not log the user out. if found vlock (and physlock) that seems to do a decent job of locking the ...
hiro protagonist's user avatar
1 vote
1 answer
2k views

`exec /bin/bash -il` fails in .profile

The Bash manpage says: After reading that file (/etc/profile), it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that ...
davidledger's user avatar
4 votes
5 answers
8k views

bash: /usr/bin/locale-check: No such file or directory error after i downgraded from ubuntu 18.10 to 18.04

After downgrading my Ubuntu from 18.10 to 18.04 when ever trying to login I am getting the following error: And opening the terminal following error displays bash: /usr/bin/locale-check: No such ...
Ahammed Shamil K's user avatar
0 votes
1 answer
273 views

Login Loop in Ubuntu 16.04 after editing the Path

I was editing the path as said in this page: Source After I did that, I logged out, and ever since that, I was not able to Login. I have tried various Login Loop Remedies said in this Exchange, but ...
remedcu's user avatar
  • 103
0 votes
1 answer
3k views

Is it possible to run a command within a login shell using sudo or su?

I'm trying to run a non-interactive command within a login shell (using su - or sudo -i) but couldn't make it work so far. Within ~/.bashrc I have sourced a script which sets all variables my ...
felima's user avatar
  • 1
0 votes
0 answers
272 views

error found when loading /home/[username]/.profile (after installing OpenFOAM)

I recently installed OpenFOAM by this youtube video https://www.youtube.com/watch?v=cKyHFwfGpVQ the software seems working but when I restart my PC and log in I find this error message Error found ...
Cs H's user avatar
  • 1
2 votes
1 answer
506 views

~/.profile doesn't run after upgrading to Ubuntu 17.10

After upgrading Ubuntu from 17.04 to 17.10, ~/.profile file has suddenly stopped running on login. Therefore, the script below, which is located in ~/.profile isn't run # set PATH so it includes user'...
AlonL's user avatar
  • 123
5 votes
2 answers
9k views

mkpasswd -m sha-512 produces incorrect login

I'm running into trouble trying to set passwords for my new users. I found a tutorial indicating that mkpasswd -m sha-512 "my password here" would produce a salted and hashed password that can be ...
Neurax's user avatar
  • 233
2 votes
1 answer
99 views

How can I login with my bash terminals running in interactive mode?

I am using a domain controller (oldap) to authenticate my hosts. It all works great except for the fact that my ldap users are initializing with non-interactive shells. I know the issue is not with ...
hanzo2001's user avatar
  • 211
2 votes
1 answer
10k views

One liner for login using su

I know you can use su to switch users within the terminal. As the account I use is non-root (without superuser permissions), it brings up a password prompt for the user I log into. Is there a way to ...
Graviton's user avatar
  • 185
3 votes
2 answers
1k views

Track logins made via non-interactive shells

This is in reference to this question. I wanted to log everytime someone logged in via ansible. I put my script in ~/.bash_profile file. Here is the script, #!/bin/bash now=$(date +"%T") echo "$...
luv.preet's user avatar
  • 5,847
0 votes
2 answers
3k views

How do I recover a deleted or overwritten bash

I have overwritten /bin/bash with another executable I wanted to mv to the /bin Now I have login loop in normal usr login as well as in the ctrl+alt+F1 terminal which u can access before login. ...
JoDu's user avatar
  • 1
2 votes
1 answer
776 views

users with bin/bash access

I was following the guide here and listed all users in passwd. There I found the following problems: /bin/false aparently allows channels and some form of forwarding nm-openconnect:x:122:130:...
imonaboat's user avatar
1 vote
0 answers
431 views

Ubuntu login loop lightdm-session errors [duplicate]

I have been trying to solve this problem for over a month now, so of course I have tried all the 3 common solutions which are all over the internet. I think I am getting close and my problem resembles ...
Aakash Mishra's user avatar
1 vote
0 answers
874 views

Run a script with root privileges, but only at very first login of any user

How can I run a script that requires root privileges at login of a (or any) user? I am building an Ubuntu 16.04 Docker image. I need to update the list of libraries with the ldconfig -v command but ...
Peter's user avatar
  • 11
63 votes
5 answers
66k views

Differentiate Interactive login and non-interactive non-login shell

I'm trying to differentiate these four terms login, non-login, interactive and non-interactive: interactive - login shell interactive - non-login shell non-interactive - login shell non-interactive - ...
d a i s y's user avatar
  • 5,511
4 votes
1 answer
2k views

Script doesn't run at startup no matter what

I have a script located at /opt/capslock_delay_fix.sh. I want the script to run after login. I've tried everything. From Startup Apps, to .bash_rc, to .profile. It just won't run the script. I wonder ...
Afonso Matos's user avatar
0 votes
1 answer
266 views

Run Executable After login [duplicate]

So I have an executable (output of gcc compiling a C program), that I would like to run after login so it is the first thing a user sees upon login. It is a graphical menu that displays system ...
Funsaized's user avatar
  • 123
6 votes
1 answer
465 views

How to set a new home directory at every login?

I'm in the process of building a kiosk system and need to give the guest user a new temporary home directory at every login. I wrote a little bash script that takes care of that but when it tries to ...
expired's user avatar
  • 111