Questions tagged [passwd]

Questions related to Linux 'passwd' command.

129 questions
56
votes
10 answers

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 Login Shell [/xhbin/tcsh]: /bin/bash chsh:…
rmp251
  • 1,181
54
votes
2 answers

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 new UNIX password: Why does it say UNIX…
28
votes
3 answers

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

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?
Cyker
  • 343
13
votes
3 answers

How to interrupt the passwd command?

When I type passwd, I get Changing password for . (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 + C doesn't work. The only way I found is to use a second…
azimut
  • 999
13
votes
3 answers

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 directories. I tried the command sudo chmod 640…
Ashlar
  • 965
13
votes
1 answer

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 then passes this in as the Linux password for the…
shaneoh
  • 347
10
votes
1 answer

Why sudo passwd username keeps asking for the current password

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 mikolaj Current password: New password: New…
9
votes
2 answers

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 why can I login to root user by sudo su? Why can't…
Sinoosh
  • 2,101
8
votes
4 answers

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 passwd root, I can easily reset the root…
Harry
  • 91
  • 1
  • 1
  • 7
7
votes
5 answers

Rename /etc/passwd and /etc/shadow for security reasons

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 /etc/xxanoda. I thought I can do a link, but for…
5
votes
1 answer

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 any help.
5
votes
1 answer

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 passwd -l, --lock Lock the password of…
weemonger
  • 403
5
votes
1 answer

Is it possible for users not to be in passwd?

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 there [alexandros.dimos@fep-62-1 ~]$ uname -a …
5
votes
1 answer

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: New password: Retype new password: Password has…
Asc
  • 103
1
2 3
8 9