Questions tagged [passwd]
Questions related to Linux 'passwd' command.
126
questions
56
votes
10
answers
140k
views
user does not exist in /etc/passwd when trying to change the default shell
I want to change my default shell from tcsh to bash. So I tried and this is what happened:
>sudo chsh userid
Changing the login shell for userid
Enter the new value, or press ENTER for the default
...
54
votes
2
answers
12k
views
Why does passwd command show "UNIX password"?
I am completely new to Linux. While I was watching a tutorial video about Ubuntu, I came across the command passwd. When I tested, it shows;
(current) UNIX password:
Enter new UNIX password:
Retype ...
28
votes
3
answers
65k
views
what is difference between /etc/shadow and /etc/passwd
Both files /etc/shadow and /etc/passwd seem to be the same, they just report some information about accounts. What is the difference between them?
17
votes
2
answers
3k
views
How to check which package created a user?
It is suspected that some packages have scripts run at install time which create user accounts in /etc/passwd. How can I check which package created a specific user?
13
votes
3
answers
95k
views
How can I find the password to www-data group to so I can change directory access rights?
I am running Ubuntu on a Oracle Vbox in Windows 7 to develop a website. I have a set of directories that have owner read/write permissions but the group www-data does not have rights on the ...
13
votes
1
answer
20k
views
Alternative to passwd --stdin in Ubuntu
I'm attempting to migrate an OpenVPN server from a CentOS box to an Ubuntu 18.04 one.
There is a script which creates new VPN users. Part of this is that it generates a new password for the user and ...
11
votes
2
answers
7k
views
How to interrupt the passwd command?
When I type passwd, I get
Changing password for <user>.
(current) UNIX password:
Now suppose at this point I change my mind and I decide to stay with my old password. What should I do?
Ctrl + ...
10
votes
1
answer
5k
views
Why sudo passwd username keeps asking for the current password [duplicate]
I am in a bizarre situation, that I can't reset user's password on my machine (Ubuntu 16.04) using eighter sudo passwd username or passwd username from the root account.
root@adam-minipc:~ # passwd ...
9
votes
2
answers
3k
views
Why can I start a root shell with sudo even with a '! ' in its shadow entry?
$cat /etc/passwd |grep -i root
root:x:0:0:root:/root:/bin/bash
$sudo cat /etc/shadow |grep -i root
root:!:17179:0:99999:7:::
In the second field of shadow file, ! means root user cannot login but ...
8
votes
4
answers
52k
views
Why does `sudo passwd root` reset my root password? Is this a security risk?
Both in my ubuntu desktop host and virtual machine. I have't login as root for about a month, during which I upgraded the kernel. I found my root password doesn't work anymore. However, by using sudo ...
7
votes
5
answers
6k
views
Rename /etc/passwd and /etc/shadow for security reasons [closed]
I have a server.
My server is secure, but let's imagine a good hacker that enter in.
He can now look into /etc/passwd and /etc/shadow.
I would like to rename that files /etc/passwd to something like /...
5
votes
1
answer
15k
views
Is it possible for users not to be in passwd? [closed]
So I have a shell on a remote server.
[alexandros.dimos@fep-62-1 ~]$ whoami
alexandros.dimos
[alexandros.dimos@fep-62-1 ~]$ cat /etc/passwd
this too long the point is my user is not ...
5
votes
1
answer
47k
views
usermod: cannot lock /etc/passwd
I get this massage:
usermod: Permission denied.
usermod: cannot lock /etc/passwd; try again later
after trying to add myself to audio group by:
usermod -a -G audio USERNAME.
I would be grateful for ...
5
votes
1
answer
2k
views
Why does `passwd -l` (--lock) also prevent ssh key-based login?
I locked a users password with passwd --lock [userName], the man page and this answers tells me, that a locked password doesn't prevent other means of logins (e.g.: ssh key-based).
Quote from man ...
5
votes
1
answer
8k
views
How to clear password history in Linux?
How do I clean the history of previous used passwords? The history which is used by passwd or whatever else?
I see:
t-account@dbg-host: ~ $ passwd
Changing password for t-account.
Current password:
...
4
votes
1
answer
460
views
Why is there no member in a primary group of the same as group user?
I have default user that i've created when installed ubuntu
ubuntu@primary:~$ id
uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),132(...
4
votes
1
answer
604
views
Revert root passwd to its default "empty"
It is said to be more secure.
Having root with a password, how do I revert it to be empty?
This documentation is pretty explanatory:
https://help.ubuntu.com/community/RootSudo
And the command would ...
4
votes
1
answer
4k
views
chpasswd silently fails to do anything; is there a substitute?
After a series of break-in attempts, I generated new random passwords for all the users on my Ubuntu 12.04.2 LTS server running Virtualmin and then, as root, used chpasswd to change their passwords. ...
3
votes
2
answers
53k
views
Allow root access without passwd
Have a VirtualBox Ubuntu guest (14.04) used for the sake of testing only.
The root user has its own password, so I can login as root in a separate terminal (su -), or directly from a login session (eg ...
3
votes
2
answers
17k
views
'root' user does not exist?
When I run the su command, the terminal returns:
user 'su' does not exist
How do I add the root user? Can anyone answer this? I tried sudo adduser su, but after this, I get the same problem.
3
votes
1
answer
1k
views
What happens if you do sudo passwd without specifying a user?
I wanted to change my own password (as an admin) so I did the following command:
sudo passwd
and then it prompted for a password but when I tryed to relog, my password was not changed. I'm now ...
3
votes
1
answer
16k
views
root shell bash commands not working
I attempted to change my sudo password(I removed myself from sudoers list by mistake). I tried following.
In recovery mode, I dropped down to root shell. It is still asking root password. Ctrl D ...
3
votes
6
answers
13k
views
How do I encrypt a new user's password using the useradd command?
I would like to create an encrypted login password for a new user while using the useradd command in the CLI. I know that using option -p will allow me to create a password, but using this option does ...
3
votes
2
answers
24k
views
Can't change root password, passwd doesn't do anything
I just got a dedicated server with ubuntu 14.04 on it. I haven't received root details in my server info email, but instead for a different user. So I wanted root access and tried to change the ...
3
votes
1
answer
12k
views
Backup and restore user passwords
Is it possible to make a file copy to backup users password and then restore them by copying them back?
It seems that the file in question is /etc/shadow as per http://en.wikipedia.org/wiki/Passwd#...
3
votes
1
answer
873
views
Use sudo in combination with libnss_switch
I implemented libnss_wrapper in the entrypoint of a docker container, in order to "create" the user passed via docker run -u UID.
This script also creates a /etc/sudoers.d/USER file to allow sudo ...
3
votes
2
answers
2k
views
Count the number of /etc/passwd entries that have no password?
How can I count the number of /etc/password entries that have no password?
3
votes
3
answers
25k
views
Special characters in password
I am looking for a list of the valid characters which can be used in a user account password on Ubuntu. man passwd just tells me:
As a general guideline, passwords should consist of 6 to 8 ...
3
votes
2
answers
131
views
User can log in with old and new passwords
Running Ubuntu 12.04, I changed the password of a user using
sudo passwd user
but now that user is able to log in using both the old password and the new password. Any idea of why this would happen?...
3
votes
0
answers
1k
views
Chromium and Chrome stored credentials are not showing up under "saved passwords"
for some reasons my already stored passwords are not visible under saved passwords, it just shows "saved passwords will appear here"
but they are there, the sql file is where it should be, ...
3
votes
1
answer
6k
views
User is not in passwd and shadow file but when getent passwd user it shows
User is not in /etc/passwd and /etc/shadow file but when I "getent passwd userSec" it shows the account details.
[root@myServer systemadmin]# getent passwd userSec
userSec:...
2
votes
2
answers
12k
views
Reset owner password on Ubuntu 18.04 single-boot Dell laptop
In trying to reset my password on my personal Ubuntu 18.04 single-boot Dell laptop, I followed various steps in the 15 answers here. Unfortunately, none of them work for me. Around steps 7 and 8 my ...
2
votes
1
answer
50
views
Importing users that will be installed by programs
I am migrating from an old Ubuntu 10.04 server to a different machine, upgrading to 14.04 at the same time.
One of my tasks is to migrate the users, so I have exported a list of users with UID > 1000 ...
2
votes
1
answer
4k
views
How to delete User with User ID and GID 0
I just created a user with UID and GID to 0. Now when I access this user lets say "abc" will login as root. But when I loin as root i cannot list all the directories with ls command where i can do it ...
2
votes
1
answer
23k
views
How to reset an user password without knowing his current password? [duplicate]
A colleague has just resigned. And his account is being used as a build account on our Ubuntu 16.04.6 LTS.
Is there any way to reset his password without knowing his current password? I have tried ...
2
votes
1
answer
555
views
How can I override passwd's checks for good passwords?
I have an encrypted /home and just had to reinstall Ubuntu. Problem is, my /home partition is encrypted with my old password, which is short, and my new system has a new password on it. I could fix ...
2
votes
2
answers
2k
views
Ubuntu 16.04LTS - pwquality.conf & pam_pwquality registering incorrect passwords, but approves them anyway
I'm working on implementing password quality requirements in Ubuntu Server 16.04LTS. I have configured 'pwquality.conf' with the requirements and '/etc/pam.d/common-password' to add pam_pwquality.so ...
2
votes
1
answer
275
views
passwd problem Ubuntu 12.04
I'm running Ubuntu Server 12.04 LTS and since the latest update of the passwd program I can't logon to the System anymore. If I enter a vaild user password the system shows me the login dialog again ...
2
votes
0
answers
2k
views
Authentication token manipulation error after upgrade from 16.04 -> 18.04 -> 20.04
Introduction
I recently upgraded the Ubuntu release from 16.04 to 18.04 to 20.04 and after completing the upgrades and fixing outstanding issues with apps that were running on that local development ...
2
votes
0
answers
1k
views
M.2 WD Blue 1TB SSD locked with ATA password - how to unlock via Linux?
Well, I have an M.2 SSD with 1TB of capacity, that was locked by the user in his Fujitsu U Series laptop. Then the motherboard died and was replaced. Both the passwords master/user are unknown. The ...
2
votes
0
answers
1k
views
Is there way to reset password if you can only login via ssh keys?
I don't know why but somehow my password no longer works. For example, I cannot do "su myself". I can still login via ssh keys. In such case, is there way to reset password?
2
votes
2
answers
822
views
Cron not launching jobs?
This is a non-standard installation of Ubuntu 18.04, the ELAR Arm based Ubuntu distribution with RockChip support for boards such as the Asus tinkerboard. The Problem, and solution, may not apply to ...
2
votes
1
answer
776
views
users with bin/bash access
I was following the guide here and listed all users in passwd. There I found the following problems:
/bin/false aparently allows channels and some form of forwarding
nm-openconnect:x:122:130:...
2
votes
0
answers
605
views
Login denied with correct Password after grub-rescue
On thursday last week i made a mistake when trying to enlarge my Win7 partition with the Windows tool.
As a result i had my bootpartition deleted from the partition table an could not boot, neither ...
1
vote
3
answers
1k
views
What stops someone from setting root password?
From what I can tell there is no password for root given by default, and it's considered a bad idea to set one.
But then what stops me or any other user from doing sudo passwd root or something like ...
1
vote
1
answer
2k
views
modify another user's password entry with sudo power
what are the sequence of commands to modify another user's password entry with sudo power in ubuntu?
I like to change the other user's pass in ubuntu with sudo power?
1
vote
2
answers
4k
views
What is the default password encryption method used in ubuntu 20.04
What is the default password encryption method used in ubuntu 20.04? is it different from 18.04 LTS
1
vote
2
answers
273
views
When changing the password for a user on my system, why does the size of /etc/shadow never get bigger or smaller?
When changing the password for a user on my Ubuntu system, I've noticed that no matter the length of the password that I choose the /etc/shadow file will always stay the same size and never increase/...
1
vote
1
answer
10k
views
how to unlock passwd from the command "sudo passwd -l [user]"?
I locked the passwd for a user by using the command,
sudo passwd -l [user]
Then, how do I unlock the passwd for this user?
1
vote
2
answers
7k
views
When I try to reset my password using root I couldn't type [duplicate]
When I try to reset my password from the root menu using the passwd command, it says "type new unix password", but I can't type.
Please help!