?
Solved

reset user password via cli

Posted on 2010-09-22
13
Medium Priority
?
636 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
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 …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

770 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