Operating System - HP-UX
1753848 Members
8281 Online
108807 Solutions
New Discussion

Re: creating users using VIPW.

 
SOLVED
Go to solution
Mark S Meadows
Valued Contributor

Re: creating users using VIPW.

Suraj :

You will need to edit the /etc/group file as well and cater for the new user in whatever group you wish them to belong to.

Why edit the password file manually when there is a perfectly good HP-UX command "useradd" that will do it for you ?

Mark
Administrating HP-UX systems for more years than I care to admit, but still enjoying it (most of the time!).

Re: creating users using VIPW.

hmmm... many comments on the mechanics of *how* to do something without bany advice on whether it makes sense to do that!

Just cos a task *can* be done in a certain way, doesn't mean it makes sense to do that. I'm pretty sure I could make money by threatening folks in the street with a knife, but I think I'll stick to having a job for that (ok weak metaphor, but hopefully you get my point).

Whilst vipw is a fine and dandy tool for *editing* the password file for quick fixes such as changing a users shell or home directory, I really wouldn't reccomend it for adding new users - its too open to user error. Stick to using the useradd command. Not only will it check more of what you pass to it, but you can accomplish what you want in fewer steps. It can be as simple as:

useradd senthil
passwd senthil

Of course that gets all the defaults, but they can all be changed on the useradd command line if you wish. Look at the man page for more details.

HTH

Duncan

I am an HPE Employee
Accept or Kudo