- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- change character in the 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
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
тАО11-27-2009 08:23 AM
тАО11-27-2009 08:23 AM
change character in the passwd file
cafeteri::4397:30:Cafeteria:/users/cafe:/bin/sh
by
cafeteri:,..:4397:30:Cafeteria:/users/cafe:/bin/sh
i have some other user with the same case no passwd. i tried a lot of things with cut and tr but never be able to do the right thing.
tanx to answer me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2009 08:48 AM
тАО11-27-2009 08:48 AM
Re: change character in the passwd file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2009 09:30 AM
тАО11-27-2009 09:30 AM
Re: change character in the passwd file
i want a program to check regularly if a user don't have password et put :,..: at the place
tanx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2009 10:19 AM
тАО11-27-2009 10:19 AM
Re: change character in the passwd file
ok, you know "vi", but "vipw" *is* vi for use w/ the password file, and is what should be used.
"i want a program to check regularly if a user don't have password et put :,..: at the place"
Lets start with what you hope to accomplish by making that substitution. It appears to me (and I could well be mistaken) the the password is still left unset and the password aging stuff is disabled.
Depending upon your answer, its conceivable that this could be done with the "password" command and "expect" as well. Also, if this is occuring frequently, you've other issues, such as "How come the password isn't set?"
OS version would be helpful. The system doesn't appear to be in trusted mode...Is that correct?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2009 10:28 AM
тАО11-27-2009 10:28 AM
Re: change character in the passwd file
the problem is the following, by default i have a program who control the aging of the passwd file and it works properly, i know the aging by unix but the organisation want to write a french message with the change of the password so i construct a program for the aging, but
i use shadowing for better protection and sometimes for the use of another special program i have to return with no-shadowing.
and in this case the aging like :,..: return to :: it's the reason i want a little program to add in this program to not let my password file without password.
i use 11i for the version
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2009 11:41 AM
тАО11-27-2009 11:41 AM
Re: change character in the passwd file
but, unless I'm mistaken, setting it to ":,..." *does* leave the passwd unset. would not it look something like "asdaksd,..." if there were a password?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2009 11:59 AM
тАО11-27-2009 11:59 AM
Re: change character in the passwd file
when we create a new employe, by default we let the user put the password they want, so it's the reason i want to put :,..: when we returned with no-shadow passwd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2009 12:44 PM
тАО11-27-2009 12:44 PM
Re: change character in the passwd file
awk can help you out...
awk.scr:
========================
BEGIN{
FS=":";
OFS=":";
}
{
if ($2 == "")
{$2=",..";
print $0;
}
}
=====================
will find any lines with :: after the login name. you'd run it like the following
awk -f awk.scr /etc/passwd > (temp file here)
further refinements are possible (and recommended) to apply it to a list of ids or whatever
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2009 12:49 PM
тАО11-27-2009 12:49 PM
Re: change character in the passwd file
i'll try it on my test machine
have a good week-end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2009 04:40 AM
тАО11-28-2009 04:40 AM
Re: change character in the passwd file
the result is exactly what i need.
Is it possible to have this result directly in the passwd file?
tanx again