passwd
अनुमतियाँ
इस्तेमाल
passwd [user]login का password बदलता है और उसका hash /etc/shadow में रखता है; macOS में Linux के लगभग कोई विकल्प नहीं होते, वहाँ dscl या Settings चलते हैं।
आम विकल्प
| विकल्प | अर्थ |
|---|---|
| -S | Linux: show the status of the account |
| -l | Linux: lock the account so the password cannot be used |
| -u | Linux: unlock it again |
| -e | Linux: expire the password so it must change at next login |
| -d | Linux: delete the password outright, which is dangerous |
उदाहरण
passwdChanges your own password; it asks for the old one first.
sudo passwd deploySets another user password without knowing the old one.
sudo passwd -l olduserLocks the account.
संख्या मोड और अक्षर मोड एक ही चीज़ कहते हैं: 755 और u=rwx,go=rx एक ही अनुमति है।
कैसे पढ़ें
- बड़े कोष्ठक [ ] उस हिस्से को दिखाते हैं जिसे छोड़ा जा सकता है।
- तीन बिंदु … का मतलब है एक से ज़्यादा दिए जा सकते हैं।
- विकल्पों में बड़े-छोटे अक्षर मायने रखते हैं — कुछ कमांड में -r और -R अलग काम करते हैं।
आम सवाल
Q. passwd क्या करता है?
login का password बदलता है और उसका hash /etc/shadow में रखता है; macOS में Linux के लगभग कोई विकल्प नहीं होते, वहाँ dscl या Settings चलते हैं।
Q. इसे कैसे लिखें?
passwd [user] — बड़े कोष्ठक वह हिस्सा दिखाते हैं जो छोड़ा जा सकता है।
Q. कितने विकल्प जानने लायक़ हैं?
यहाँ 5 दिए हैं; पूरी सूची man passwd में है। यह कमांड अनुमतियाँ में आती है।
मिलती-जुलती कमांड
man पेज: man passwd