Nethence Newdoc Olddoc Lab Your IP BBDock  


Warning: those guides are mostly obsolete, please have a look at the new documentation.

UnixWindowsOracleObsoleteHardwareDIYMechanicsScriptsConfigs

Configuring the user environment and services on HP/UX 11i v1 (part 3)
 
System environment and daemons
Do not forget to check and fix your umask, just in case.
umask
umask 022
 
Enable the Korn Shell and use it for root's shell,
cd /etc/
cat >> shells <<EOF9
/bin/ksh
EOF9
chsh root /bin/ksh
 
Eventually give a home to the root user,
cd /
ls -ld root/
mkdir -p root/
cd /etc/
vi passwd
change,
root:...:0:3::/root:/bin/ksh
apply immediately,
export HOME=/root
cd ~/
ln -s ../.profile .profile
Note. The full file name is needed for the target symlink on 11i v1.
 
Fix the file mode creation mask
cd ~/
cat >> .profile <<EOF9
 
umask 022
w
EOF9
tail .profile
 
You should now have a nice KSH environment (vi mode by default). I would love to make ksh the default shell when creating users but eventhough the -D argument exists for useradd on 11i v1, it cannot be used togeather with -s.
 
Eventually create some system administration user (secondary group root) to log who's connecting through Telnet (by default), RSH (by default) or SSH,
useradd -m -s /bin/ksh -G root adminuser 
passwd adminuser 
then clean up the skeletons so that new users get an empty directory (e.g. for FTP),
cd /etc/
ls -l skel/
mv skel/ skel.dist/
Note. HP/UX fortunately won't warn about the non-existant skel folder when creating a user directory, that's nice !
 
Configure syslog for a server with no heavy load,
cd /etc/
mv -i syslog.conf syslog.conf.dist
vi syslog.conf
like,
*.info  /var/adm/syslog/syslog.log
*.emerg  *
fix the file permissions
cd /var/adm/syslog/
ls -l syslog.log
chmod 440 syslog.log
ls -l syslog.log
and apply,
/sbin/init.d/syslogd stop
/sbin/init.d/syslogd start
 
Eventually synchronize the time,
ntpdate -u ntp.obspm.fr 
Note. "ntpdate" is included in the default system.
Note. Change the ntp server address accordingly.
 
Eventually add the rc.local feature to the system,
cd /sbin/
cp -i rc rc.dist
cat >> rc <<EOF9
 
/sbin/sh /sbin/rc.local
EOF9
tail rc
touch rc.local
Note. I am placing it in /sbin/ instead of /etc/, just like the rest of the HP/UX rc scripts.
 

(obsolete, see the new doc)