Recently I had chance to play with HP-UX UNIX on HP hardware. To my surprise most of Linux command do work with HP-UX with some minor changes in syntax :). It has nifty tool called SAM (The System Administration Manager) is a GUI user interface for performing most routing administrative tasks without using command line admin utility. The SAM works under CDE (common desktop environment).
I'm gone administrate at least 3-4 HP-UX box for next couple of weeks before they are going to get new UNIX admin for growing data center. So I will have chance to get my hands on dirty with HP-UX. That means you will see couple of HP-UX related entries in this blog. As soon as these HP-UX box comes in our IDC, I was asked to add user accounts. To be frank I was bit frightened because I never worked on HP-UX. Here is what so far I have learned:
HP-UX USER ADMIN COMMANDS:
These are almost same as Linux user admin commands, here is quick summery:
- /etc/passwd - User account database file
- /etc/group - Group database file
- /etc/profile - System login script
- ~/.profile - Users own login script
- ~/.shrc OR ~/.kshrc OR ~/.cshrc - Users own shell startup script (these are executed always whenever users login)
- /etc/skel/ - Default directory from which all files copied when new users created.
a) useradd - Create a new users
# useradd -m rocky
b) usermod - Modify user account
# usermod -G dbusers rocky
Modify secondary group membership of rocky
c) userdel - Remove user account, -r removes user foo home directory.
# userdel foo # userdel -r foo
e)groupadd - Create a group
# groupadd dbusers
f) groupmod - Modify a group
Chantge the name of ftpusers to wwwproject
# groupmod -n wwwproject ftpusers
g) groupdel - Delete/remove the account group
# groupdel wwwproject
h) grpck - Check for syntax error in /etc/group file
i) pwck - Check for sysntax error in /etc/passwd file
j) passwd - Setup password and manage password restriction
Setup foo's password
# passwd foo
Remove/delete password/null password
# passwd -d foo
Force to change password at next login
# passwd -f foo
Disable/Lock user account
# passwd -l foo
Unlock HP-UX user account by editing (using vi text editor) /etc/passwd file:
# vi /etc/passwd
Man pages are real help. These system are in our internal network; in coming days at least 2 system will go online for testing purpose so I may need to configure routing and other stuff (right now they are getting IP from our DHCP server).
So far so good. To be frank, I like the HP-UX , no problem to administrate it. May be in coming days I will see more surprises (ill keep my finger crossed).
Between I have noticed Sun had redesigned sun.com website. New sites looks quite cool and tries to improve corporate image.