Solved

reset user password via cli

Posted on 2010-09-22
13
628 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
  • 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
 
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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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 500 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

Give your grad a cloud of their own!

With up to 8TB of storage, give your favorite graduate their own personal cloud to centralize all their photos, videos and music in one safe place. They can save, sync and share all their stuff, and automatic photo backup helps free up space on their smartphone and tablet.

Question has a verified solution.

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

Suggested Solutions

Syslogd is a utility that traps and logs messages sent by running processes. It is configured with the syslog.conf file, which consists of lines containing a pair of fields: "the selector field which specifies the types of messages and priorities to…
We could spend the next millennium discussing the differences of the Mac and Windows platforms. The next century will continue to have fanatics on both side of the equation and neither side will win the war. However, that’s not why we are here. W…
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 …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now