sanjog ramtekek


{ City } bangalore
< Country > india
* Profession * freshers
User No # 35090
Total Questions Posted # 0
Total Answers Posted # 1

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 8
Users Marked my Answers as Wrong # 1
Questions / { sanjog ramtekek }
Questions Answers Category Views Company eMail




Answers / { sanjog ramtekek }

Question { Tech Mahindra, 8896 }

How to change the default new user shell without mentioning
-s /bin/sh in cmd useradd or usermod and which file we need
to change? this is not for existing user


Answer

shell initialization file are use to set user login environment.
there are two type of shell initialization
1) system wide initialization files ,i.e /etc/profile, &
/etc/.login)
then /etc /profile is used to change system environment for
bash shell korn shell bourne shell .
and ./etc/.login used to set system envi. for c shell, tc
shell ,z shell.
note :- shell initialization file template location under
/etc/skel directory .
2)user initialization:- file located users
($HOME.Profile , $HOME.csher, $HOME.login) .
then $HOME.profile for bourne /korne and
$HOME.csher,$HOME.login for c/Tc shell.

HOME= /export /home/user1
PATH= /usr/bin by default value.
to change
$PATH = /usr/bin/:/usr/sbin.
Vi editor the path into
file $HOME.Profile (for bash /korn shell)
to check, $echo $PATH
/usr/bin :/usr/sbin

Is This Answer Correct ?    8 Yes 1 No