Hi there,
Does anyone know of a way I can become a different user in a script? I need to run a script as one user (not root), and change to another user half way through.
It stops and asks me for the password, and I can't find a way to feed the password in through the script.
Thanks (2 Replies)
Ok, first off, I'm working on a Vmware ESX server, which I guess is loosely based off of Red Hat 9. But I'm brand new to it (today), so be nice.
I'm trying to write a useradd script that will create some users, generate a password, and set their password to this newly generated password.
... (2 Replies)
Hi Friends.
I am new to scripting now i want to change the root password using the script with standard password.
which is the easy scripting to learn for the beginner, Thanks in advance. (2 Replies)
Hi all
I have some 106 users of which i need to change the password of them to a common one. I dont know their paswword. But i need to reset them to a common one. How can i do this with a shell script? It would be a great help if some one can help to sort out this.:b::b:
I know it can be... (0 Replies)
Hi All,
How to enforce all users to change their password when they try to login.
I am having Solaris 9 and 10.
Even it would be much better if anyone can say to enforce all users to change their password next morning they login.
Thanks in advance,
Deepak (3 Replies)
I am on SunOS SolarisServer 5.11 11.1 i86pc i386 i86pc , I am trying to change password for a user,but I get the following message.I cannot find any google help on the matter.can anyone help?
root@SolarisServer:~# passwd
passwd: Changing password for stain
Please try again
Please try... (6 Replies)
Hi All,
I am having Solaris 5.10 acting as NIS.
How do i change multiple user password in NIS in a batch.
I have predefined users with their passwords to be set:
Example:
user1 password1
user2 password2
Pls advise. (0 Replies)
for UserName in `cat users` ; do useradd -d /u02 -s /usr/libexec/openssh/sftp-server -G ftp-users $UserName ;
PassWord=$( echo $( tr '' '' <<< ${UserName:0:1} )${UserName:1} ) ;
echo "$PassWord@123" | passwd $UserName --stdin ; done
can some one explain what the bold text do
Please use... (5 Replies)
Hi
I want to change password for around 100 users on an aix server.
I have the list of those 100 users with me.
instead of doing
# passwd username
for all the 100 users one by one, can you please help with a script through which we can change the password for all the 100 users in a... (2 Replies)
Discussion started by: newtoaixos
2 Replies
LEARN ABOUT OPENSOLARIS
passwd
passwd(1openssl) OpenSSL passwd(1openssl)NAME
passwd - compute password hashes
SYNOPSIS
openssl passwd [-crypt] [-1] [-apr1] [-salt string] [-in file] [-stdin] [-noverify] [-quiet] [-table] {password}
DESCRIPTION
The passwd command computes the hash of a password typed at run-time or the hash of each password in a list. The password list is taken
from the named file for option -in file, from stdin for option -stdin, or from the command line, or from the terminal otherwise. The Unix
standard algorithm crypt and the MD5-based BSD password algorithm 1 and its Apache variant apr1 are available.
OPTIONS -crypt
Use the crypt algorithm (default).
-1 Use the MD5 based BSD password algorithm 1.
-apr1
Use the apr1 algorithm (Apache variant of the BSD algorithm).
-salt string
Use the specified salt. When reading a password from the terminal, this implies -noverify.
-in file
Read passwords from file.
-stdin
Read passwords from stdin.
-noverify
Don't verify when reading a password from the terminal.
-quiet
Don't output warnings when passwords given at the command line are truncated.
-table
In the output list, prepend the cleartext password and a TAB character to each password hash.
EXAMPLES
openssl passwd -crypt -salt xx password prints xxj31ZMTZzkVA.
openssl passwd -1 -salt xxxxxxxx password prints $1$xxxxxxxx$UYCIxa628.9qXjpQCjM4a..
openssl passwd -apr1 -salt xxxxxxxx password prints $apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0.
OpenSSL-0.9.8 Oct 11 2005 passwd(1openssl)