11-08-2017
Understanding the difference between individual BASH login scripts
Hello... and thanks in advance for reading this or offering me any assistance
I'm trying to understand specific differences between the various login scripts... I understand the differences between interactive vs non-interactive and login vs non-login shells... and that's not where my question is
Where I'm confused is what I've read seemed to allude that certain login scripts would have a certain type of content and others could have a different type of content
I've seen people posting about how one command (like umask) would work in one script but not another and I haven't seen a clear cut definition of which scripts should contain what
I would be very grateful if someone could explain any restrictions or rules with the login script... I'm particularly confused on the purpose & function of the /etc/bashrc, ~/.bashrc, and /etc/environment files... I understand bashrc & .bashrc are used in non-login interactive environments... I'm confused on what their content would be
Anyway... once again thank you if anyone took the time to read this!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Is anyone can help me to find out the difference in Shell Scripts between HP and Sun.
Thanks in advance,
Vijay R (3 Replies)
Discussion started by: rv_kumar
3 Replies
2. UNIX for Dummies Questions & Answers
I'm trying to get a clear picture of how startup scripts are executed during
bootup. When run-level N is entered, the scripts in /rcN.d are executed.
I understand that the S* scripts are executed in numerical order during bootup.
What I don't understand is if the K* scripts are executed... (0 Replies)
Discussion started by: darkmatter14B
0 Replies
3. Shell Programming and Scripting
Hello Friends,
I am new to the scripting & have to analyze bunch of regular production scripts. It has .ksh which calls on the .awk script having many functions
I need to understand and debug the scripts ASAP
Can anybody please let me know as how can I debug, I want to see the flow of code... (3 Replies)
Discussion started by: amberj123
3 Replies
4. Shell Programming and Scripting
What is the difference between calling the sub scripts of below two line.
/home/scripts/devdb.sh
. /home/scripts/devdb.sh
sh /home/scripts/devdb.sh
We are using the suse 2.0 version (4 Replies)
Discussion started by: kingganesh04
4 Replies
5. Shell Programming and Scripting
Hi,
I have to write a program to compute the checksums of files
./script.sh
I wrote the program using bash and it took me forever since I am a beginner but it works very well.
I'm getting so close to the deadline and I realised today that actually I have to use normal Bourne shell... (3 Replies)
Discussion started by: pgarg1989
3 Replies
6. Shell Programming and Scripting
Need a better understanding of shell scripts (14 Replies)
Discussion started by: sureshkumar4737
14 Replies
7. IP Networking
Hi all,
I am new to linux routing and would like to keep a possible running dialog about some scripts I have been studying and what the different parts of them mean. We are using Openwrt backfire along with openvpn and Swyx as VoIP. My goal is to eventually implement some QoS using dsmark, but... (1 Reply)
Discussion started by: shodg001
1 Replies
8. Shell Programming and Scripting
Hi All,
I need some urgent help regarding some info.
I have a cluster of servers for which I have two scripts for management.
control.sh is a bash script meant for restarting/stopping the servers.
manger.ksh is a kshell script. It is a master script to manage restarting/stoppping and... (3 Replies)
Discussion started by: ankur328
3 Replies
9. Solaris
Hi
There is an application installed on a server, that has a unique login account, but many users are using it with the same login name! How can we overcame this by creating individual accounts for the same application login account? (11 Replies)
Discussion started by: fretagi
11 Replies
10. UNIX for Dummies Questions & Answers
I am not able to understand below line in unix bash shell.Could anyone explain what it will do
result="${path1}/*${var1}*${var2}*wssreligibleitem*.csv"
path1 is defined and it is a directory path
var1 is defined and it holds string value like abc
var2 is defined and it holds string value like... (6 Replies)
Discussion started by: vamsi.valiveti
6 Replies
CHSH(1) User Commands CHSH(1)
NAME
chsh - change login shell
SYNOPSIS
chsh [options] [LOGIN]
DESCRIPTION
The chsh command changes the user login shell. This determines the name of the user's initial login command. A normal user may only change
the login shell for her own account; the superuser may change the login shell for any account.
OPTIONS
The options which apply to the chsh command are:
-h, --help
Display help message and exit.
-R, --root CHROOT_DIR
Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory.
-s, --shell SHELL
The name of the user's new login shell. Setting this field to blank causes the system to select the default login shell.
If the -s option is not selected, chsh operates in an interactive fashion, prompting the user with the current login shell. Enter the new
value to change the shell, or leave the line blank to use the current one. The current shell is displayed between a pair of [ ] marks.
NOTE
The only restriction placed on the login shell is that the command name must be listed in /etc/shells, unless the invoker is the superuser,
and then any value may be added. An account with a restricted login shell may not change her login shell. For this reason, placing /bin/rsh
in /etc/shells is discouraged since accidentally changing to a restricted shell would prevent the user from ever changing her login shell
back to its original value.
FILES
/etc/passwd
User account information.
/etc/shells
List of valid login shells.
/etc/login.defs
Shadow password suite configuration.
SEE ALSO
chfn(1), login.defs(5), passwd(5).
shadow-utils 4.5 01/25/2018 CHSH(1)