Search Results

Search: Posts Made By: ADay2Long
7,160
Posted By ADay2Long
I forgot that if it didn't match it means that...
I forgot that if it didn't match it means that there is indeed a password. Forgive my noobiness!

Still working on my grasp of regexs.

Thanks for your help Corona688!
7,160
Posted By ADay2Long
What would be my best approach right now since I...
What would be my best approach right now since I want to search for something that starts with

"^$ACCNAME:"

and doesn't end with

[0-9a-zA-Z./$]

but from what I see that's for the second...
7,160
Posted By ADay2Long
how to check for valid password
I need to check if an account has a valid password.

Would something like this work?

read ACCNAME
if grep -q "^$ACCNAME:\$6:" /etc/shadow; thenI noticed every entry in my shadow file that has a...
1,420
Posted By ADay2Long
Actually what I ended up doing is something like ...
Actually what I ended up doing is something like

if [[ $0 == "lock"]]; then ...

So now if it's true I know the user wants to lock and if it's false I know he wants an unlock.

Makes sense?
1,420
Posted By ADay2Long
Reading CLI input for script
I've always written scripts where the user executes the script and I prompt them for what they want to do.

But I'm trying to write a script where root executes the script 'lock' or its hard-link...
1,851
Posted By ADay2Long
Oh I see, I didn't click that my statement was...
Oh I see, I didn't click that my statement was being read as a string and would always fail. Makes sense. Still new with all this.

2 more questions. Now my until loop exits when the user enters...
1,851
Posted By ADay2Long
if statement problem
Writing my script and I'm banging my head on the desk right now ...

My biggest problem is the 3rd IF statement where I check if the username exists. Doing the grep command on it's own in the...
Showing results 1 to 7 of 7

 
All times are GMT -4. The time now is 12:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy