Questions tagged [passwd]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-2 votes
2 answers
105 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
53 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,114
6 votes
2 answers
2k 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
2 answers
1k 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
0 answers
31 views

Additional Examination to that of RkHunter False Flags

When initially exploring with RkHunter; such was characterised with the following "Warnings" on the initial setup and scan; albeit not having found any indicators associated to known or ...
W4hn51nn's user avatar
0 votes
0 answers
206 views

Error when using use_authtok and use_first_pass with pam_pwhistory, but not when I use try_first_pass?

RHEL 7.9 I have a question similar to What's the difference between use_authtok and try_first_pass or use_first_pass in pam_unix? I have created a new local file in /etc/pam.d called system-auth-...
user1070061's user avatar
0 votes
1 answer
353 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
  • 319
0 votes
2 answers
181 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
0 votes
1 answer
102 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
3k 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
297 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
565 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
10 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
3k 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
786 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
80 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
434 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
364 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,403
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
890 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
  • 185
0 votes
2 answers
270 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
  • 169
0 votes
1 answer
101 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
0 votes
0 answers
693 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
4k 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
  • 171
3 votes
1 answer
2k 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
240 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
675 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
86 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
367 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
440 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
  • 6,515
2 votes
1 answer
324 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
  • 403
1 vote
1 answer
677 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
  • 6,515
1 vote
0 answers
418 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
547 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
  • 6,515
2 votes
2 answers
923 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
2k 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
352 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
230 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
723 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
98 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
255 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
312 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
0 votes
1 answer
282 views

Why are there two root and nobody accounts according to "getent passwd"?

The output further down was retrieved by employing machinectl on a Ubuntu 20.04 host: machinectl pull-tar https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64-root.tar.xz focal ...
0xC0000022L's user avatar
  • 16.6k
-2 votes
1 answer
395 views

What are the numbers in /etc/passwd? (and is there a way to find answers to these kind of questions without searching the internet)? [closed]

If i run grep user /etc/passwd, i get the string user:x:1021:1021::/home/user:/bin/bash. What does the numbers "1021:1021" mean? And is there a offline way to find what these mean? If i do ...
Carla is my name's user avatar
0 votes
0 answers
692 views

/etc/passwd minicom as the user shell with parameters

I have an application that I need to constrain the user to operate a serial console. This works perfectly fine: myuser:x:1005:1005:Someone,,,:/home/myuser:/usr/bin/minicom However, I realize that I ...
Leonardo's user avatar
  • 150
1 vote
1 answer
708 views

kali user password not saved after reboot

I am running Kali on a persistent USB (in a nvme enclosure) and it works fine. But when i do "passwd aUserName" log out and back in, the new password is used like it should. However when i ...
Collega's user avatar
  • 115
2 votes
2 answers
769 views

Why can't I get a unique list of shells? [duplicate]

Trying to get a unique list of shells on my system. When I run this command: cat /etc/passwd | cut -d ':' -f 7 | uniq I get: /bin/bash /bin/sync /sbin/shutdown /sbin/halt /bin/bash I can't ...
Brian Peterson's user avatar

1
2 3 4 5