Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > 'lock -p' not working

'lock -p' not working
Thread Tools
Junior Member
Join Date: Nov 2001
Location: SeaLab 2021
Status: Offline
Reply With Quote
Apr 3, 2005, 09:59 PM
 
Lock is a grat command for locking a terminal session for a certina amount of time. The -p option sets the unlock password invoked to the the password of the currently logged in user. This is a great option to make an alias with. But for some reason, the command isn't recognizing my login password. I have tried changing the password to see if I could refresh the file, but it didn't work. I also took a look at '/etc/passwd', and didn't see my account there, which isn't a good sign. If anyone has any clues, please tell. Also, I think I might be onto something with looking into '/etc/passwd', but I don't know my uid or gid. If anyone knows where I can find that information, that would also be really helpful too. Thanks

Runeko Lovell
e-mail: lovellr@gmail.com
aim: runcoberry
One OS to Rule them all,
and in the Darkness [dramatic pause] Bind them.

-- Tiger
     
Professional Poster
Join Date: Apr 2001
Location: Long Beach, CA
Status: Offline
Reply With Quote
Apr 4, 2005, 12:55 PM
 
Passwords are not stored in /etc/passwd. They are stored in the netinfo database in OS X.

See:

nicl -raw /var/db/netinfo/local.nidb

or the Netinfo Utility in /Applications/Utilities

w/r to lock, it's not a utility I use.

ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Apr 4, 2005, 05:38 PM
 
Looking at the source to lock, it's apparent that it hasn't been updated in a long time and the method it's using to obtain the user password won't work on modern operating systems where the user password is shadowed.

I have filed a bug with Apple about this (#4078586), but I wouldn't be hopeful about it being fixed until at least Tiger+1 (and doubtful even then).
     
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
Apr 4, 2005, 06:09 PM
 
In the meantime, might as well use the wonderful gnu screen, which comes with OS X.
Here's a nice little tutorial. You can lock a screen session with ctrl-A, ctrl-X.
     
Professional Poster
Join Date: Apr 2001
Location: Long Beach, CA
Status: Offline
Reply With Quote
Apr 4, 2005, 08:11 PM
 
Also, you can enable the traditional method of storing user information using the Directory Access application. You'll have to enable it and add it to the search path.

ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Apr 4, 2005, 09:13 PM
 
Originally posted by Detrius:
Also, you can enable the traditional method of storing user information using the Directory Access application. You'll have to enable it and add it to the search path.
Even then lock won't work, btw. And you'll have absolutely zero tools out of the box for managing the database
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 05:03 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2