- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- comment in passwd file
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
тАО05-02-2007 05:21 AM
тАО05-02-2007 05:21 AM
If # has been put in the beginning of a line in /etc/passwd file and it is saved;
Will it corrupt the /etc/passwd file and system will not come up ?
If this is done by mistake then how to recover it ?
I am just curious to know and this has not been done.
Thanks,
Shiv
Solved! Go to Solution.
- Tags:
- passwd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2007 05:29 AM
тАО05-02-2007 05:29 AM
SolutionWhy would you want to do this? If you want to prevent an account from logging in on an untrusted system, replace the second field of the account with an "*". This is the same as running the safer:
# passwd -l login
If you have manually editted your '/etc/passwd' you would be advised to check its integrity with:
# pwck
If you *must* manually edit '/etc/passwd' the safe way is to use:
# vipw
Using 'vipw' will at least insure you can't mangle the root account. Attempts to do so will be rejected.
Of course, one always has a backup of key configuration files to restore...
Regards!
...JRF...
- Tags:
- pwck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2007 05:34 AM
тАО05-02-2007 05:34 AM
Re: comment in passwd file
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2007 05:45 AM
тАО05-02-2007 05:45 AM
Re: comment in passwd file
Will this cause the system to not boot? While I never tried rebooting when I tested this, I would guess not... unless you're "commenting" the root user, of course.
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2007 05:53 AM
тАО05-02-2007 05:53 AM
Re: comment in passwd file
This is a forum of Unix Gurus so just wanted to know their veiwpoint.
Best Regards,
Shiv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2007 05:53 AM
тАО05-02-2007 05:53 AM
Re: comment in passwd file
Ex .: If you remove the last : of one of the users, all the data under that will be removed and you will lost your configuration.
In this case the better idea is hold a backup with the comments that you need before change the original file.
Hope this helps,
Marc0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 01:31 AM
тАО05-03-2007 01:31 AM
Re: comment in passwd file
Rob...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 02:37 AM
тАО05-03-2007 02:37 AM
Re: comment in passwd file
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2007 05:29 AM
тАО05-03-2007 05:29 AM
Re: comment in passwd file
Best Regards,
Shiv