- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- creating users using VIPW.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-09-2009 10:46 PM
тАО03-09-2009 10:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-09-2009 10:55 PM
тАО03-09-2009 10:55 PM
Re: creating users using VIPW.
vipw edits the password file while setting the appropriate locks, and does any necessary processing after
the password file is unlocked. If the password file is already being edited, you will be told to try again later.
The vi editor is used unless the environment variable EDITOR indicates an alternate editor. vipw
performs a number of consistency checks on the password entry for root, and does not allow a password
file with an incorrectly formatted root entry to be installed.
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-09-2009 11:18 PM
тАО03-09-2009 11:18 PM
Re: creating users using VIPW.
can we use vipw to edit any file?
pls explain me how to use vipw to addusers in /etc/passwd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-09-2009 11:18 PM
тАО03-09-2009 11:18 PM
SolutionVIPW is noting but edit the /etc/passwd file using vi.
The advantage of using vipw is that only one person can edit at one time. So that it will avoid file corruption.
Using vipw you can directly edit uid/gid/comment/shell/login directory instead of using usermod.
You can also create a new user by putting new entry in /etc/passwd. But note that you need to change the password using passwd command. Also you need to manually copy the startup files from skelton directory.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-09-2009 11:21 PM
тАО03-09-2009 11:21 PM
Re: creating users using VIPW.
No. You can't edit any other file.
>>pls explain me how to use vipw to addusers in /etc/passwd.<<
Just add another line like any other user in /etc/passwd.
See man vipw for more details.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-09-2009 11:45 PM
тАО03-09-2009 11:45 PM
Re: creating users using VIPW.
but if we use vipw to edit /etc/passwd then no one can edit that file "/etc/passwed" at same time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-09-2009 11:51 PM
тАО03-09-2009 11:51 PM
Re: creating users using VIPW.
Why? vipw does that for you.
>but if we use vipw to edit /etc/passwd then no one can edit that file "/etc/passwed" at same time.
That's correct, only one use can be modifying /etc/password at a time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-09-2009 11:52 PM
тАО03-09-2009 11:52 PM
Re: creating users using VIPW.
That's correct, only one user can be modifying /etc/passwd at a time. Other users can still read it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2009 12:49 AM
тАО03-10-2009 12:49 AM
Re: creating users using VIPW.
vipw inshore that the modification is doing by only one user ├в ┬ж
Well you can copy one of the string from your password file and edit according to your user ,then edit the password file with vipw├в ┬ж
If your system is trusted the execute pwconv to update tcb file as well
Thanks & Regards
Ashish Parashar
System Administrator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2009 01:10 AM
тАО03-10-2009 01:10 AM
Re: creating users using VIPW.
Yes you can used vi to edit the /etc/passwd file but in my concerned it better to use vipw instead of vi.
To create new account using vi
If you are using vi to create a account then you need to do this steps
1.create a home directory for user i.e. newuser
2.copy all file from /etc/skel into /home/newuser
3. open /etc/passwd file into vi
4.copy paste last line
5.edit username:uid:gid:comments:homedirectory:shell
6.save the file check with pwck command
7.change the passwd for newuser
8.passwd newuser
HP Guru's please correct me if I miss any step's
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2009 01:26 AM
тАО03-10-2009 01:26 AM
Re: creating users using VIPW.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2009 01:36 AM
тАО03-10-2009 01:36 AM
Re: creating users using VIPW.
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
