Shell Scripting: Users "**Never logged in**"
I'm new to shell scripting and am trying to automate the checking of a certain security risk.
I'm trying to test and see if there are any user accounts that haven't been logged in yet. I know I can do this with a script such as Code:
#!/bin/bash I've read that when a new user is created, the UID (User ID) starts at 500 and increments. I believe I should be able to grab the individual's user ID like this: Code:
#!/bin/bash Since new users on my system will be assigned generic passwords (all of which are going to be the same password), unused user accounts are a security risk on my systems. I'd like to automate the checking process to save myself some time. Thanks everyone! |
Quickie:
Code:
cat /etc/passwd | while read l; do Why? Is this absolutely necessary? unused user accounts are a security risk on my systems. ...yes, and you're doing your best to thwart any efforts to correct it, right? :-] I've read that when a new user is created, the UID (User ID) starts at 500 and increments. Starting UID is configurable though. |
All times are GMT -5. The time now is 05:30 AM. |