i would like to make a script for OS X that allow me to change the password for a user account.
i have to use this script on several iMac with the same user/password.
i want to store the passwords inside the script, no security problems involved.
the command is :
When i run the command, the terminal asks me to enter :
example : new password : test
old password : test2
thank you
and sorry for my english
Last edited by Scrutinizer; 01-02-2017 at 12:13 PM..
Reason: code tags
I have a script which connects to database. I want user to input user name and password but dont want the password characters to be displayed on screen. How can i accept input from user in encrypted form. (2 Replies)
Hello,
I need to change user and run some commands by using a script.
lets say, I'm using
su - someuser << start
password required -----> how can I enter the password here
command 1
command 2
command 3
command 4
start
While trying to run this I got the following message:
"standard... (2 Replies)
Hi
I have the following issue
i am going to ask from the user the password
The password can have $ anywhere that is first last or in between but i have to append \ before the $ sign in the password can anyone please help
For example
o/p in the console will be like the... (3 Replies)
I am writing a script that can automatically login to Storage CAM console. i use this command,
./sscs login -u user -h localhost.
at that time it will prompt for password, is it possible for store password in a file and supply it when it waits for password.
Thanks in advance.
Regards
SK (1 Reply)
Hi guys,
I am using Solaris 10 and we install IBM OnDemand server there. there's a command called arsload that we use to load document and query document too. I need to write a script to query document but when querying document, this command prompt for username then password.
My question is... (3 Replies)
I'm a fairly new AIX admin (disclaimer).
We have SQL scripts written by end users that use a userid and passwd to connect to our DB2 database.
Is it possible to create an "input file" that contains the db2 connect parameters and yet secure the file from the SQL creator?
i.e., they can "use"... (2 Replies)
All,
My script is
-----------
#cat pass.sh
password=123
echo -n "Enter pass:"
read pass
if ; then
echo "Correct password"
else
echo "Wrong password"
fi
When i run this script, text(password) which i'm entering is visible in screen... (4 Replies)
Hey guys,
This is my situation.
I'm using the script to add a user account, however, i want the same details copied into the htdigest password list. the format is username:virtualservername:hashed/encrypted password.
This is the command :
sudo htdigest /etc/apache2/passwords... (0 Replies)
hy,
I wrote a simple shell script to monitor (with Nagios) a SNX VPN function. Here the Code snippet:
testing=`ssh user@IP-address 'ls /etc/sysconfig/network-scripts/ifcfg-eth0'`
#echo $testing
if ; then
echo "VPN is working"
exit 0
else snx -s server -u user
... (2 Replies)
I am looking for a way to start a script and have it prompt for a password that will be used later on in the script to SSH to another host and to SFTP. I don't want the password to be hard coded. Below is my script with the actual IP's and usernames removed.
#!/usr/bin/expect -f... (2 Replies)
Discussion started by: jbrass
2 Replies
LEARN ABOUT MOJAVE
passwd
PASSWD(1) BSD General Commands Manual PASSWD(1)NAME
passwd -- modify a user's password
SYNOPSIS
passwd [-i infosystem [-l location]] [-u authname] [user]
DESCRIPTION
The passwd utility changes the user's password. If the user is not the super-user, passwd first prompts for the current password and will
not continue unless the correct password is entered.
When entering the new password, the characters entered do not echo, in order to avoid the password being seen by a passer-by. The passwd
utility prompts for the new password twice in order to detect typing errors.
The new password should be at least six characters long and not purely alphabetic. Its total length should be less than _PASSWORD_LEN (cur-
rently 128 characters), although some directory systems allow longer passwords. Numbers, upper case letters, and meta characters are encour-
aged.
Once the password has been verified, passwd communicates the new password to the directory system.
-i infosystem
This option specifies where the password update should be applied. Under Mac OS X 10.5 and later, supported directory systems are:
PAM (default) Pluggable Authentication Modules.
opendirectory
A system conforming to Open Directory APIs and supporting updates (including LDAP, etc). If no -l option is specified, the
search node is used.
file The local flat-files (included for legacy configurations).
nis A remote NIS server containing the user's password.
-l location
This option causes the password to be updated in the given location of the chosen directory system.
for file,
location may be a file name (/etc/master.passwd is the default)
for nis,
location may be a NIS domainname
for opendirectory,
location may be a directory node name
for PAM,
location is not used
-u authname
This option specifies the user name to use when authenticating to the directory node.
user This optional argument specifies the user account whose password will be changed. This account's current password may be required,
even when run as the super-user, depending on the directory system.
FILES
/etc/master.passwd The user database
/etc/passwd A Version 7 format password file
/etc/passwd.XXXXXX Temporary copy of the password file
SEE ALSO chpass(1), login(1), dscl(1), passwd(5), pwd_mkdb(8), vipw(8)
Robert Morris and Ken Thompson, UNIX password security.
HISTORY
A passwd command appeared in Version 6 AT&T UNIX.
Mac OS X August 18, 2008 Mac OS X