Execute a command on user logon
In Linux desktop system, I want to execute a command when the user logs in.
In Linux desktop system, I want to execute a command when the user logs in.
I’d like to log in as a different user without logging out of the current one (on the same terminal). How do I do that?
Let’s say I create a user named “bogus” using the adduser command. How can I make sure this user will NOT be a viable login option, without disabling the account. In short, I want the account to be accessible via su - bogus, but I do not want it to be accessible via a regular login prompt.
I found three configuration files.
I have a basic understanding of dotfiles in *nix system. But I am still quite confused about this Difference between Login Shell and Non-Login Shell?
As far as I know, the interactive shells may be login or not login, and the start up files for them are different.
According to the answer to What are login and non-login shells? on Ask Ubuntu, GNOME Terminal is a type of non-login shell.
As pointed out in the excellent book, A Practical Guide to Fedora and Red Hat Enterprise Linux, 6th Edition:
Once a friend of mine (who is an experienced Unix/Linux user) told me that setting root’s shell to something other than sh (i.e bash or zsh) might create problems, because some script might assume that the shell is sh and do something weird.
I want to run this command every time I log in (or every time I start up, if that doesn’t work): xmodmap -e 'keysym Delete = Menu' -e 'keysym Menu = Delete'
I’d like to give temporary SFTP access to a support guy. How do I create an SFTP user? And how can I delete it once the job is done?