View Full Version : Stupid password...
I forgot the password for one of the user accounts, but I can't change it! I logged in as root, but it still will not let me change the password via the GUI. I need to know how to change another users password from the command line. Can anyone help me out?
01-23-2002, 09:03 PM
i think the command line interface to netinfo is thru the niutil command.
i was able to change a vanilla user's password in the users preference panel, logged in as an admin account.
it screeched about the keychain not being changed to the new password, so that could be problematic, but you could prolly just delete the keychain pref file for that user and they'd have to start a new one.
btw, i tried changing the password in the netinfo utility, but it didn't work, that is, the old password, nor the new one i changed it to, would work.
anybody know how to netinfo manager change user password? documentation on this util is scant, i think.
You can do it with:
nicl - NetInfo command line utility
Read the man pages
Awsome. I didn't know NetInfo had a command line utility like that. Thanks!
01-23-2002, 10:47 PM
% apropos netinfo
netinfo(3) - library routines for NetInfo calls
netinfo(5) - network administrative information
netinfod(8) - NetInfo daemon
nibindd(8) - NetInfo binder
nicl(1) - NetInfo command line utility
nidomain(8) - NetInfo domain utility
nidump(8) - extract text or flat-file-format data from NetInfo
nifind(1) - find a directory in the NetInfo hierarchy
nigrep(1) - search for a regular expression in the NetInfo hierarchy
niload(8) - load text or flat-file-format data into NetInfo
nireport(1) - print tables from the NetInfo hierarchy
niutil(1) - NetInfo utility
Glad you find it useful...
NetInfo isn't a standard *nix thing (it comes from NeXTSTEP) so there are a lot of people who are newbies to it.
I'm not much past newbie myself (NetInfo is very powerful)
A couple of months ago somebody else gave me the following info:
Because there is potential to screw up your computer, you should back up the NetInfo database:
Just run the command 'sudo gnutar czf netinfo_backup.tgz /var/db/netinfo/local.nidb' (without the single quotes, of course); that will back it up into a file called netinfo_backup.tgz.
A bit of explanation: The NetInfo database is acts like a directory tree. You can imagine it like this:
/users is a directory (folder) that contains a bunch of files representing users on the machine,
/machines contains a bunch of files that represent computers that you might have access to.
/ is a directory that contains a bunch of other directories.
(It's actually a bit simpler and more complicated than that, but if you can think of it that way you'll do fine.)
Using nicl :
There are a couple of commands that will be familiar to you: ls (list directory), cd (change directory), pwd (print working directory), & cat (display file).
To change things, such as the name of the user there are a couple of commands you should know:
delete (or just rm) removes things. Be careful with it!
create creates things. This is very powerful. Not only can it create "file" or "directories" ("files" and "directories" are actually the same thing), but it can also create properties.
If you want to experiment (a good idea!) you should do this:
[localhost:~] pm% sudo nicl .
/ > create test
/ > cd test
As long as you don't cd outside of /test, or do things like rm /users, you're free to mess around.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.