User Environments. Objectives to provide appropriate environments for different types of users Contents different login programs user profiles restricted shells security issues Practicals to provide special user accounts Summary. Login Shell.
Related searches for User Environments
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
# cat >/home/admin/bin/shutdown
# shutdown script
trap "" 2 3
echo "Type number of seconds to shutdown or"
echo -n "Ctrl-D to abandon shutdown ? "
if read N; then
[ -z "$N" ] && N=180
echo "Shutting down in $N seconds"
/sbin/shutdown -i0 -g$N -y
# useradd -o -u 0 -d / -s /home/admin/bin/shutdown shutdown
# passwd shutdown
PATH=$PATH:/usr/X/bin:. # include required search directories
EDITOR=vi # define line editting editor (for history mechanism)
TERM=vt100 # must reflect terminal used, otherwise all non-
character-based applications, including vi, will fail
MAIL=/var/mail/$LOGNAME# location for your mail box
SHELL=/bin/bash # shell used for 'escape' from program. eg. when you
type :!cmd within vi, the cmd is executed by the shell
ENV=$HOME/.bashrc # location of bash shell run command file
umask plain text files (vi) directories (mkdir)
000 rw-rw-rw- rwxrwxrwx
022 rw-r--r-- rwxr-xr-x
033 rw-r--r-- rwxr--r--
027 rw-r----- rwxr-x---
077 rw------- rwx------
# more /etc/motd
Welcome to Acme's Development System.
Access to this system is restricted to authorised users only.
Unauthorised access is prohibited and offenders are liable to prosecution.
System will be down all day on Sun 23 April for preventative maintenance.
A typical system profile (/etc/profile) :
trap "" 2 3 ENV=$HOME/.kshrc export ENV
ulimit -c 0
trap 2 3
A typical user profile (.bash_profile):
A typical user bashrc file (.bashrc):
alias dir=ls lf='ls -FC'
export PS1='$PWD[!] '
set -o vi
what do you think this
line should contain?
$ ls -al /shared
drwxrwsr-t 1 trapper staff 1024 Dec 25 09:30 .
drwxr-xr-x 1 root sys 512 Dec 25 09:30 ..
$ id -a
uid=318(hawkeye) gid=300(users) groups=100(staff),300(users)
$ cp lfile /shared
$ ls -l lfile /shared/lfile
-rw-r--r-- 1 hawkeye users 232 Jan 18 09:58 lfile
-rw-r--r-- 1 hawkeye staff 232 Jan 19 11:42 /shared/lfile
/usr/lib/rsh & /usr/bin/rksh