Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

reset user password via cli

Posted on 2010-09-22
13
Medium Priority
?
637 Views
Last Modified: 2012-08-14
I have forgoten the VNC password but can log in via ssh.

1) How do I reset a user account password via CLI

2) How do I reset the VNC password and restart the vnc service

running tiger on an apple xserve
0
Comment
Question by:TokenHash
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
13 Comments
 
LVL 8

Expert Comment

by:nognew
ID: 33735688
Hi there!
 try this:
To show existing password:
$ sudo cat /Library/Preferences/com.apple.VNCSettings.txt
7F513D02E4A8C5E2FF1C39567390ADCA
$ sudo cat /Library/Preferences/com.apple.VNCSettings.txt | perl -wne 'BEGIN { @k = unpack "C*", pack "H*", "1734516E8BA8C5E2FF1C39567390ADCA"}; chomp; @p = unpack "C*", pack "H*", $_; foreach (@k) { printf "%c", $_ ^ (shift @p || 0) }; print "\n"'
hello
$

Cheers,
t.
0
 

Author Comment

by:TokenHash
ID: 33735792
ok show me the password to be 12345

but when I input it in vnc viewer, i get password incorrect
0
 

Author Comment

by:TokenHash
ID: 33735842
do i need to restart the vnc service?
0
Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

 
LVL 8

Expert Comment

by:nognew
ID: 33735957
if you have changed the password recently you may try to restart the service. Are you sure you are connecting to the right VNC server (screen)? I have feeling this is some sort of user error here.
Cheesr,
t.
0
 

Author Comment

by:TokenHash
ID: 33736019
newbie to cli

ip is correct

not sure how to restart the vnc via cli
0
 
LVL 8

Expert Comment

by:nognew
ID: 33736059
try that:
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent
0
 

Author Comment

by:TokenHash
ID: 33736240
:(

still no luck

0
 

Author Comment

by:TokenHash
ID: 33736278
or if you know how to view a list of user account in the workgroup manager ? and reset a users password in the workgroup? via cli
0
 
LVL 8

Expert Comment

by:nognew
ID: 33736368
can you try somethnig like:
sudo passwd <username>
0
 
LVL 8

Accepted Solution

by:
nognew earned 2000 total points
ID: 33736393
Actually try this:
pwpolicy -a pws_admin -u usertochange -setpassword newpassword
0
 

Author Comment

by:TokenHash
ID: 33741937
od:~ root# pwpolicy -a pws_admin -u jimbob -setpassword Pa55word
Password:
pws_admin is not a password server account.

error
0
 
LVL 8

Expert Comment

by:nognew
ID: 33741964
Hi!
you need to replace pws_admin with your pws_admin username I believe.
Cheers,
t

0
 

Author Closing Comment

by:TokenHash
ID: 33741996
Fantasic :)
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
This article outlines the struggles that Macs encounter in Windows-dominated workplace environments – and what Mac users can do to improve their network connectivity and remain productive.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question