Skip to main content

Questions tagged [passwd]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
55 views

does /etc/passwd primary group mean you are in that group?

This is in RHEL-8.10 for what it's worth... in /etc/passwd I have ron:x:20000:100:me:/home/ron:/bin/bash so my uid is 20000, and my gid is 100 which as defined by convention in /etc/group is the ...
ron's user avatar
  • 7,423
0 votes
1 answer
23 views

Debian passwd package sources - Unable to find patch that modifies passwd utility options

I noticed passwd utility doesn't support the -s/--stdin option on Debian which allows to read password from standard input. With this option you can do something like echo mypassword | passwd -s ...
designerrr's user avatar
0 votes
1 answer
64 views

What is the meaning of having a username as the last field of an `/etc/passwd` entry?

In Google Compute Engine VM in /etc/passwd file i see an entry like this one: root:x:0:0:root:/root:my_logged_in_username_here. What could that mean? The last field is for user command interpreter as ...
Lyubomir's user avatar
  • 113
0 votes
0 answers
9 views

How to reintegrate my users from a backup to a new system fresh installed?

I have had to reinstall my system - it is a Debian but my question addresses any distribution. I have disconnected the hard drive where my /homeis settled to avoid any risk when reinstalling the ...
lalebarde's user avatar
  • 265
-1 votes
1 answer
79 views

Why/When to use passwd -d? [closed]

According with man passwd exists the following information: -d, --delete Delete a user's password (make it empty). This is a quick way to disable a password for an account. It will set the named ...
Manuel Jordan's user avatar
0 votes
0 answers
158 views

Setting user passwords via kernel parameter

What is the correct syntax to use these bits of information from systemd manual: systemd-sysusers(8) will look for the credentials passwd.hashed-password., passwd.plaintext-password. and passwd.shell....
gcb's user avatar
  • 488
-2 votes
2 answers
432 views

Password not getting set for this user creation script

The following script is supposed to create a user and generate a random password on an Ubuntu machine: #!/bin/bash #Script should execute with sudo/root access if [[ "${UID}" -ne 0 ]] then ...
Navdeep Singh's user avatar
0 votes
1 answer
66 views

I've forgotten my password but am logged in--what tools can I use to assist in recovery and limit damages?

I have an encrypted hard drive. The hard drive, root user, and primary user all share the same password. I have successfully logged in but seem to have forgotten the password. I'm looking to limit the ...
mpr's user avatar
  • 1,174
6 votes
2 answers
3k views

Why should I use `sudo` with the `passwd` command to change the password of another user?

If you look at the permission set of the passwd command, you will see this: user@apple:~$ ls -l /bin/passwd -rwsr-xr-x 1 root root 59976 Nov 24 2022 /bin/passwd /bin/passwd has the SUID bit set and ...
grassy's user avatar
  • 71
5 votes
3 answers
3k views

How do I get rid of password restrictions in passwd

My usual password just doesn't fit into its standards, and frankly this install doesn't need to be fort knox. Is there any way to disable them? edit: this helped me https://www.reddit.com/r/Gentoo/...
wtry's user avatar
  • 51
0 votes
1 answer
598 views

PAM password "minlen" setting not enforced

I installed Ubuntu 18.04 and manually modified /etc/security/pwquality.conf with the following settings: minlen = 14 minclass = 4 (without # at the start of the line). However, when I add a new user ...
hutcruchi's user avatar
  • 369
0 votes
2 answers
406 views

Difference between *LK* in /etc/shadow and /usr/sbin/nologon in /etc/passwd

What is the practical difference between setting *LK* in /etc/shadow and setting /usr/sbin/nologon in /etc/passwd? When would we choose one over the other? When would we combine them?
Lyubomir's user avatar
  • 113
0 votes
1 answer
159 views

Difference between passwd and passwd- file as well as shadow and shadow- file

on my server running UnraidOS I got a bit suspicious. There are both 'passwd' and 'passwd-' files (same goes for shadow(-)). These ones should be only backups as I understood. Running: root@Unraid-...
Dakanomo's user avatar
1 vote
2 answers
5k views

How can I reuse an old password?

I recently changed my password on my VMware Photon OS host. Now I want to reset it to the old one again, but passwd does not let me do it and displays the following message: Password has been already ...
stackprotector's user avatar
-4 votes
1 answer
354 views

"passwd" can not read password from standard input on Kali Linux

i'm trying to make a small shell script that creates a new account, it needs to not show the password when writing it. But i got a error and can't find a solution.
NezukoTM's user avatar
0 votes
1 answer
835 views

AuditD - Log sudo access to /etc/passwd by all commands but never for other files

I'm struggling with the following task for AuditD /etc/passwd should be monitored for any access doesn't matter if a cat or sudo cat is used...ok, easy. BUT I should also prevent auditd to log any ...
SirStephanikus's user avatar
1 vote
0 answers
12 views

Create new user in DCL-935 firmware

For an assignment for school, I am investigating a dlink IP cam firmware for vulnerabilities. In the emulation I can see there is a user called admin. in the /etc/passwd I can see the password (blank)....
Ronnie Kuster's user avatar
8 votes
3 answers
4k views

Password Policy - BAD PASSWORD: The password is just rotated old one

After setting password expiration via: sudo chage -d 0 username Then changing the password and login as that user. When I type "passwd" and try to set the original password I receive message;...
johnnyhopper's user avatar
0 votes
1 answer
965 views

useradd -p option [duplicate]

I can't understand the purpose of -p option in 'useradd' Let's create a user useradd -m -p 'pass1' user1 after running the command above, when trying to log in using su - user1 authentication fails....
mehrdad's user avatar
  • 65
0 votes
1 answer
90 views

etc shadow file for passwd - calculate not only date but time

I want to know if there is a way to get the last password change date + time stamp ?
yolook_daemon's user avatar
-1 votes
1 answer
508 views

passwd source code

I am trying to look at the source code of the passwd and gpasswd programs. These tools check the effective UID set to zero to complete execution successfully. But I am a noob to C and couldn't find ...
Tomas 's user avatar
  • 141
10 votes
2 answers
1k views

Source of passwd error messages

I am testing if the passwd command could run if the setuid bit is disabled. I disabled the setuid by running the following command: chmod 0554 /bin/passwd After doing so, I tested if the passwd ...
Tomas 's user avatar
  • 141
0 votes
0 answers
647 views

How to change my password without current password or root access?

I changed my user password two months ago. Logged in. Machine has been up and running since. Now I forgot my new password and want to run a sudo command. 'passwd' wants my current password before ...
DarenW's user avatar
  • 3,502
0 votes
1 answer
1k views

How to check which user has changed their or other user's password?

How can I capture (if there is a log file somewhere) when a user changes their password or another user's password? I see this log but I can't determine whom change password for user XXXX Mar 31 12:41:...
abd kah's user avatar
1 vote
1 answer
1k views

What's the difference between empty password and no password?

As said in this question in comments, empty password and no password are different things. So what's the difference between empty password and no password in Linux Debian?
Vad Sim's user avatar
  • 195
0 votes
2 answers
285 views

Help needed: sudo passwd -l

I used the command sudo passwd -l on my own user account in Ubuntu and now I can't log in anymore. Is there any way to unlock that? I tried adding "!" in front of my password but it still ...
No Name's user avatar
  • 101
1 vote
1 answer
269 views

What could this portion of the 'Information Security Handbook' by John M.D Hunter possibly mean?

So I am reading this Information Security Handbook by John M.D. Hunter. I quote two paragraphs of the book below: "An operating system is usually capable of preventing users from performing ...
Joker's user avatar
  • 189
0 votes
1 answer
107 views

How to update user password with the file has password,without prompt key in?

I am using Debian 11,set password with shadow. I random generate password into file pas: cat pas "Th3P@ssw0rd" When I update password to normal user has sudo privilege, sudo passwd username ...
kittygirl's user avatar
  • 111
4 votes
1 answer
2k views

How can a user start its own login shell?

I want the default command for a Docker image to start up a login shell for the container's user.¹ Something like: … USER someuser CMD /bin/zsh --login That above gets a login shell, but does not ...
posita's user avatar
  • 151
3 votes
1 answer
3k views

unable to change directory with CD command

My situation might not be typical, and this is a reverse shell I got. I find myself stuck in the root directory; I can't "cd" to change my current directory to anywhere. However, I can list/...
QIfan Guo's user avatar
  • 131
0 votes
0 answers
809 views

changing the password of root remote host with no interaction

How could I change the password for a root account on remote server without a need to enter the password each time? Localhost is a MacOS computer and I have sshpass installed, remote host in an ...
Kal800's user avatar
  • 35
2 votes
1 answer
5k views

Running "su command" as another user

I have a user user1 which is part of wheel group and has all the root privileges . user1 is able to change password for user2 using the below command (My understanding is that here passwd is run as ...
meallhour's user avatar
  • 181
3 votes
1 answer
3k views

Recovering /etc/passwd file

I deleted my /etc/passwd with my fat fingers. I saw that there is a /etc/passwd- that looks like a backup file but I cannot copy it to restore the original one since I can't sudo anymore. My volume is ...
zakrapovic's user avatar
0 votes
0 answers
304 views

Password change failed because password does not meet minimum quality requirements. What does this error mean?

On my macOS machine, I tried something like: passwd derp After I input the old password and the new password, it shows the following: passwd: Password change failed because password does not meet ...
Abel Melquiades Callejo's user avatar
1 vote
2 answers
1k views

Why does openssl create different hashes for the same string, and how does linux accept the different hashes when switching users?

Background As an experiment, I was adding new users (as the root user) by manually creating entries into /etc/passwd. To hash the passwords I was using openssl, in particular OpenSSL 1.1.1g but the ...
BitWrecker's user avatar
1 vote
0 answers
90 views

passwd results in signal SIGSEGV: segmentation violation

On Ubuntu 18.04 I am attempting to change my password with sudo passwd myusername I enter the new password and get this: Enter new UNIX password: Retype new UNIX password: fatal error: ...
Omroth's user avatar
  • 153
0 votes
1 answer
421 views

Why Command "cata/etc/..." does not give me any results? [closed]

Why if I type: cat/etc/passwd or cat/etc/shadow the termnal give back me the message: no such file or directory found ? At least I should visualize me like user
mari jane's user avatar
1 vote
0 answers
483 views

PAM guru help to interpret system-auth password-auth RHEL 7

I have a RHEL 7.9 system which currently has identical system-auth and password-auth files located under /etc/pam.d/. That file is auth required pam_faillock.so preauth audit deny=3 ...
ron's user avatar
  • 7,423
2 votes
1 answer
454 views

How to change the keyphrase in the pass program without reinitializing a pass store from scratch

I'm using the pass application which I find really handy. I want to change the keyphrase (mother password). I had a look at the man page there but i'm not sure what to do. Do I have to use the init ...
ecjb's user avatar
  • 465
1 vote
1 answer
811 views

setting temporary password only expiration date

using RHEL 7.9, I have local user accounts defined in /etc/passwd and /etc/shadow. my password changing process is to email users, when needed, a temporary password. as root I do passwd <username&...
ron's user avatar
  • 7,423
1 vote
0 answers
476 views

Joined linux host to AD server using realmd. Unable to change ad user passwords from the command line

Have a fairly simple setup of one AD server with various linux hosts. We attached the linux hosts to our domain by using: realm discover domain.example.com realm join domain.example.com -U user.adm ...
IT_User's user avatar
  • 362
1 vote
0 answers
687 views

passwd -S Alternate authentication scheme in use

in RHEL 7.9, I do passwd -S on all accounts in /etc/passwd as part of checking user accounts. # passwd -S <account name> root PS 1969-12-30 0 99999 7 -1 (Password set, SHA512 crypt.) bin LK ...
ron's user avatar
  • 7,423
2 votes
2 answers
1k views

Chsh Enterpise login

I installed Fedora 34 and did the Enterprise Login (domain user). I can't use chsh for change the user default shell to zsh because user does not exists. (It's not present in /etc/passwd because is ...
Michele Giulietti's user avatar
2 votes
2 answers
3k views

AIX 7 - Command To Check If Never Used User Accounts Are Locked

On AIX 7, I am trying to craft a command that would check the user accounts on my system that have never logged in and to check if they are locked. If a user account that has never logged in exists ...
Help's user avatar
  • 97
0 votes
1 answer
420 views

Change linux password and expire at the same time

I'm learning Linux bash scripting and faced an error without notification. I would like to understand why I can't both change password and expire it at the same time? Additionally, there is no any ...
Asmoox's user avatar
  • 105
2 votes
1 answer
257 views

Command To Check If Users In /etc/passwd Exist In A Different File

Is it possible to query the /etc/passwd file to view all user UIDS less than 200 and to check if those users are within a file such as /etc/ftpusers? So far, I have managed to craft the command below ...
Help's user avatar
  • 97
1 vote
0 answers
861 views

List of Users - RHEL

I want to get list of users - both human and machine who have access to the unix server. OS is: NAME="Red Hat Enterprise Linux Server" VERSION="7.9 (Maipo)" I tried cat /etc/...
Abhishek Jain's user avatar
0 votes
0 answers
110 views

Server ip with multiple domains / but only 1 user on /etc/passwd

I have access on a server that is running multiple domains on it, but when i check the /etc/passwd file i see only 1 user available ? is it mean that each user have his own linux instalation ? virtual ...
X-HAT's user avatar
  • 1
2 votes
1 answer
297 views

How can I start a login shell with options?

I am messing around and want to have a guest user whose login shell is a restricted one like rbash. Unfortunately there is no rbash executable anywhere on my Slackware installation, so I have to do ...
Architect's user avatar
  • 173
1 vote
1 answer
330 views

how to disable "Retype new password" when changing password in RHEL/CentOS

Is there a configuration setting in RHEL/CentOS thru which Retype new password can be disabled while changing user password? In shell we can use echo 'username:newpassword' | chpasswd I have to set it ...
HarbS's user avatar
  • 11

1
2 3 4 5