- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Trusted system:seperate locked from active acc...
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
Forums
Discussions
Discussions
Discussions
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
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-11-2007 02:18 AM
05-11-2007 02:18 AM
Thanks in advance.
-Brian
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2007 02:50 AM
05-11-2007 02:50 AM
Re: Trusted system:seperate locked from active accounts
Before writing your script, I would have looked to see if passwd -sa provided sufficient data.
The problem with the script appears to be either a typo or not full understanding of what data lies where in trusted systems.
Good Luck,
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2007 03:04 AM
05-11-2007 03:04 AM
Solutiongrep $i /etc/passwd|awk -F: '{print "username: " $1,"uid: " $3,"Description: " $5,"HomeDir: " $6,"Shell: " $7}'>>active.txt
You should note that if ${i} is 'rob' that it will match user 'rob' but it will also match 'robert', 'roberto', 'robin', 'throb', ... AND it will match any string 'rob' anywhere in the file --- not just the first field.
On the other hand if your awk script tested if ($1 == "rob")
then only user 'rob' would be matched.
Grep is a very poor choice for this because you are using grep to do something that awk can do much better all by itself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2007 03:05 AM
05-11-2007 03:05 AM
Re: Trusted system:seperate locked from active accounts
Thanks
-Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2007 04:46 AM
05-11-2007 04:46 AM
Re: Trusted system:seperate locked from active accounts
Poor choice indeed.
Attached is the updated (working) version for anyone else who has an IT audit coming up.
Thanks for the help
-Brian