• Home
  • Disclaimer
  • Contact
  • Archives
  • About
  • Subscribe
  • Support
  • Advertise

Kernel Talks

Unix, Linux, & Cloud!

  • How-to guides
    • Howto
    • Disk management
    • Configurations
  • OS
    • HPUX
    • Linux
  • Commands & tools
    • Commands
    • Software & Tools
    • System services
  • Cloud computing
    • AWS CSA preparation guide!
    • Cloud Services
  • Tips & Tricks
  • Linux commands
You are here: Home / HPUX

Password file commands

Published: September 30, 2016 | Modified: June 20, 2020 | 808 views



Ever wondered which all special commands can be executed on /etc/passwd file? Learn here the list of special commands and their uses for the password file.

Here is the list of commands which can be used on /etc/passwd file.

vipw

This command is being used to edit /etc/passwd file manually. It is not recommended to edit /etc/passwd file manually. All changes on user accounts should be carried out using commands like usermod. But in some scenarios, if you want to edit the password file manually, then use this command. It opens the file in vi editors and locks it for other users. So any other admin from any other terminal won’t be able to open the file in the editor for manual editing. This ensures the integrity of the file.

Also read: Understanding /etc/passwd file.

pwck 

To check the integrity of /etc/passwd file this command can be used. Once executed it checks passwd files and its all fields. It reports any issues observed in the file e.g. if the user directory does not exist on the server, it will report it.

# /usr/sbin/pwck

[/etc/passwd] sfmdb:*:107:20::/home/sfmdb:/sbin/sh
        Login directory not found

[/etc/passwd] smmsp:*:109:20::/home/smmsp:/sbin/sh
        Login directory not found

pwconv

It generates /etc/shadow file which has user passwords in the encrypted format under the second field in each user entry. If /etc/shadow file already exists on the system then this command will update relevant fields if there were any changes in /etc/passwd file. If your system is trusted (see tsconvert command) then the user password database (Trusted Computing Database) is being maintained separately and /etc/shadow doesn’t exist on the system. In that case, this command will update the TCB accordingly.

# /usr/sbin/pwconv
Updating the tcb to match /etc/passwd, if needed.

pwunconv

It reverses the changes made by pwconv command.

⇠ Previous article
UID range in hpux
Next article ⇢
Account lock unlock status in Linux

Related stuff:

  • Auto port aggregation APA configuration in HPUX
  • Hyperthreading in HPUX
  • Move disks/LUN from one server to another without losing data
  • LVM commands tutorial: Part 3: Logical Volume (lvcreate, lvdisplay, lvremove)
  • Understanding /etc/hosts file
  • LVM cheatsheet
  • HPUX Patch naming conventions
  • Host to guest disk mapping in HP iVM
  • sar command (Part I): All you need to know with examples
  • File encryption / password protect file in HPUX
  • How to install patch/software in HPUX
  • Complete guide: Transfer Of Control (TOC) in HP servers

Filed Under: HPUX Tagged With: /etc/passwd, how to check /etc/passwd, how to edit /etc/passwd, password file, password file commands, pwck, pwconv, pwunconv, vipw

If you like my tutorials and if they helped you in any way, then

  • Consider buying me a cup of coffee via paypal!
  • Subscribe to our newsletter here!
  • Like KernelTalks Facebook page.
  • Follow us on Twitter.
  • Add our RSS feed to your feed reader.

Share Your Comments & Feedback: Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get fresh content from KernelTalks

  • Email
  • Facebook
  • RSS
  • Twitter

Popular posts

  • How to start, stop & restart MariaDB server in Linux
  • How to rescan disk in Linux after extending VMware disk
  • How to reset iptables to the default settings
  • 4 ways to check the size of physical memory (RAM) in Linux
  • How to list YUM repositories in RHEL / CentOS
  • mount.nfs: requested NFS version or transport protocol is not supported
  • How to setup domain name in Linux server
  • MobaXterm X11 proxy: Authorisation not recognised
  • 5 steps guide for SMTP configuration in Linux
  • How to resolve setenv: command not found

Get Linux & Unix stuff right into your mailbox. Subscribe now!

* indicates required

This work is licensed under a CC-BY-NC license · Privacy Policy
© Copyright 2016-2020 KernelTalks · All Rights Reserved.
The content is copyrighted to Shrikant Lavhate & can not be reproduced either online or offline without prior permission.