Sponsored Content
Operating Systems Solaris How to programmatically reset a users password.? Post 302879219 by rbatte1 on Wednesday 11th of December 2013 10:19:47 AM
Old 12-11-2013
A simple
Code:
sudo passwd $user

..... and you are not prompted for the old password. You will be prompted twice for the new password, so verification is taken care of too. Additionally, sudo will write to the syslog for your auditors to drool over.



I hope that this helps,
Robin
Liverpool/Blackburn
UK
 

10 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

I would like to reset my password

Hi Moderators, I forgot the login password and am accessing the forum page through save form password credentials. Could you please reset my password ? Thanks, :) (5 Replies)
Discussion started by: matrixmadhan
5 Replies

2. Solaris

Looking for a script to reset password

All, I have a Solaris 9 system and I would like to create a script that would reset the password of a local user to something specific on a daily basis. Someone suggested the following: passwd --stdin username < passwd_file However, this doesn't work on Solaris. Does anyone know of... (3 Replies)
Discussion started by: soliberus
3 Replies

3. Forum Support Area for Unregistered Users & Account Problems

Password reset not being accepted

Why would a password reset, a provided numerical value thru email, not be accepted when trying to log in with it? I have expired the 5 login attempts twice with still no acceptance. thanks for the help (3 Replies)
Discussion started by: W.A.C.
3 Replies

4. UNIX for Advanced & Expert Users

Password reset

Can anyone tell me if it is possible to have cron change your password every month from an encrypted list of passwords?I have several servers I hardly ever go near but when I do the password has always expired and it takes a long time to get the administrators to reset it for me. I was thinking... (4 Replies)
Discussion started by: steadyonabix
4 Replies

5. Solaris

ALOM password reset

Hi , How to reset ALOM/SC password for Solaris box Sun Fire T-200 Thanks (5 Replies)
Discussion started by: chetansingh23
5 Replies

6. UNIX for Dummies Questions & Answers

How do you reset username/password

Picked up a 3b2 running System V. Works fine, but it requires a username and password. Is the username "root" or "sysadm"? How do I find out and how to I reset it or bypass it? Thanks. (2 Replies)
Discussion started by: TanRuNomad
2 Replies

7. OS X (Apple)

Reset Password

So my dad bought an iMac from my mom, but she does not know the admin password anymore. I read on the apple forums that I should look here for help on resetting the password. The iMac runs OSX 10.6.3. I would really appreciate any help. Thanks (3 Replies)
Discussion started by: PhsycoDragon
3 Replies

8. Red Hat

User password reset

Hello - I want to reset user password in multiple server via root ID. I have passwordless authentication for root between all the servers. I an use loop to reset the password. I am using below command in loop echo mypassword | passwd username --stdin However, if anyone sees history - he... (5 Replies)
Discussion started by: saurabh84g
5 Replies

9. UNIX for Beginners Questions & Answers

Reset Password

Installed Solaris 11.3 Gnome Desktop It wouldn't let me log on at lock screen after first reboot. It finally relented and let me in after about 20 logon failures. How do I reset password now that I am in? (10 Replies)
Discussion started by: Solaris User
10 Replies

10. Forum Support Area for Unregistered Users & Account Problems

Password sent via reset password email is 'weak' and won't allow me to change my password

I was unable to login and so used the "Forgotten Password' process. I was sent a NEWLY-PROVIDED password and a link through which my password could be changed. The NEWLY-PROVIDED password allowed me to login. Following the provided link I attempted to update my password to one of my own... (1 Reply)
Discussion started by: Rich Marton
1 Replies
sudo_root(8)						      System Manager's Manual						      sudo_root(8)

NAME
sudo_root - How to run administrative commands SYNOPSIS
sudo command sudo -i INTRODUCTION
By default, the password for the user "root" (the system administrator) is locked. This means you cannot login as root or use su. Instead, the installer will set up sudo to allow the user that is created during install to run all administrative commands. This means that in the terminal you can use sudo for commands that require root privileges. All programs in the menu will use a graphical sudo to prompt for a password. When sudo asks for a password, it needs your password, this means that a root password is not needed. To run a command which requires root privileges in a terminal, simply prepend sudo in front of it. To get an interactive root shell, use sudo -i. ALLOWING OTHER USERS TO RUN SUDO
By default, only the user who installed the system is permitted to run sudo. To add more administrators, i. e. users who can run sudo, you have to add these users to the group 'admin' by doing one of the following steps: * In a shell, do sudo adduser username admin * Use the graphical "Users & Groups" program in the "System settings" menu to add the new user to the admin group. BENEFITS OF USING SUDO
The benefits of leaving root disabled by default include the following: * Users do not have to remember an extra password, which they are likely to forget. * The installer is able to ask fewer questions. * It avoids the "I can do anything" interactive login by default - you will be prompted for a password before major changes can happen, which should make you think about the consequences of what you are doing. * Sudo adds a log entry of the command(s) run (in /var/log/auth.log). * Every attacker trying to brute-force their way into your box will know it has an account named root and will try that first. What they do not know is what the usernames of your other users are. * Allows easy transfer for admin rights, in a short term or long term period, by adding and removing users from the admin group, while not compromising the root account. * sudo can be set up with a much more fine-grained security policy. * On systems with more than one administrator using sudo avoids sharing a password amongst them. DOWNSIDES OF USING SUDO
Although for desktops the benefits of using sudo are great, there are possible issues which need to be noted: * Redirecting the output of commands run with sudo can be confusing at first. For instance consider sudo ls > /root/somefile will not work since it is the shell that tries to write to that file. You can use ls | sudo tee /root/somefile to get the behaviour you want. * In a lot of office environments the ONLY local user on a system is root. All other users are imported using NSS techniques such as nss-ldap. To setup a workstation, or fix it, in the case of a network failure where nss-ldap is broken, root is required. This tends to leave the system unusable. An extra local user, or an enabled root password is needed here. GOING BACK TO A TRADITIONAL ROOT ACCOUNT
This is not recommended! To enable the root account (i.e. set a password) use: sudo passwd root Afterwards, edit the sudo configuration with sudo visudo and comment out the line %admin ALL=(ALL) ALL to disable sudo access to members of the admin group. SEE ALSO
sudo(8), https://wiki.ubuntu.com/RootSudo February 8, 2006 sudo_root(8)
All times are GMT -4. The time now is 10:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy