Questions tagged [passwd]

unix/mac questions about password changes or storage, the related `.passwd` file or `passwd` command

140 questions
237
votes
20 answers

How to automatically add user account AND password with a Bash script?

I need to have the ability to create user accounts on my Linux (Fedora 10) and automatically assign a password via a bash script(or otherwise, if need be). It's easy to create the user via Bash e.g.: [whoever@server ]# /usr/sbin/useradd newuser Is…
ModernCarpentry
  • 3,127
  • 2
  • 20
  • 14
57
votes
1 answer

How do I set a blank password for the root user in slitaz

I am running slitaz distro, and would like to completely remove the root password. I have tried giving a blank password to the passwd command, however that did not seem to do the trick. It gave me an error password was too short, ans it still asked…
Plazgoth
  • 1,242
  • 1
  • 12
  • 22
47
votes
3 answers

List of all users that can connect via SSH

I recently started looking at my auth-logs and surprisingly found bots from china trying to bruteforce their way in this (didnt try hard). I went all about changing numerous things that bots would never check, and made harder to bruteforce. My…
tommydrum
  • 597
  • 1
  • 4
  • 9
21
votes
1 answer

Does the Android operating system have files like /etc/passwd, /etc/shadow, and /etc/group?

If not, how does android determine whether a user belongs to a certain group?
sunway
  • 237
  • 1
  • 2
  • 7
18
votes
2 answers

I am unable to find the etc/passwd file in cygwin

I recently installed cygwin, and have been unable to find my passwd/etc file in order set to HOME. Is there any way to force cygwin to generate the file?
0x6
  • 241
  • 1
  • 2
  • 6
18
votes
2 answers

Useradd using crypt password generation

I am working on what I thought was a very simple script to dynamically create an FTP user using 'useradd' There are several parts of this process I am unfamiliar with, and an entire day's research has not gotten me too far. Here is what I…
Sandwich
  • 2,304
  • 3
  • 24
  • 30
13
votes
1 answer

Adding a Service to Name Service Switch

So I am trying to add a service to NSS (Name Service Switch). Please note the GNU guide on how to do it here. I have been following that guide. I need to implement a service that works with the passwd database. The problem I am having is my module…
David Mokon Bond
  • 1,576
  • 2
  • 18
  • 42
12
votes
1 answer

Use of /etc/passwd-, /etc/shadow-, /etc/group-

In addition to the files : /etc/group, /etc/passwd and /etc/shadow, I could see three files in my linux machine. /etc/group- /etc/passwd- /etc/shadow- I cannot see these files in my root filesystem. But when I try to add one user using useradd…
nitin_cherian
  • 6,405
  • 21
  • 76
  • 127
9
votes
1 answer

How can you run a GIT container as the current user?

I want to use GIT from within a Docker container. The usage as documented on https://hub.docker.com/r/alpine/git/ is quite simple: docker run -it --rm -v ${HOME}:/root -v $(pwd):/git alpine/git clone ... This works. One big downside of this is…
user8870331
8
votes
2 answers

/etc/passwd vs /usr/bin/passwd

In my CentOS 7 system (and other Linux flavors), I have noticed that there are two passwd files, /etc/passwd and /usr/bin/passwd. The former contains plaintext information about the users, groups, default shells, etc., whereas the latter is a binary…
Stefan Petrovic
  • 89
  • 1
  • 1
  • 3
8
votes
5 answers

Change Unix password from command line over Python/Fabric

I would like a way to update my password on a remote Ubuntu 10.4 box with fabric. I would expect my fabfile.py would look something like this: def update_password(old_pw, new_pw): # Connects over ssh with a public key authentication …
Brian M. Hunt
  • 81,008
  • 74
  • 230
  • 343
8
votes
3 answers

Passing input into passwd using pipe

How can I pipe some input using echo, into program that requires user typing something two times? for example echo "somepassword"|passwd someuser creates this error message Enter new UNIX password: Retype new UNIX password: passwd: Authentication…
user3667832
  • 257
  • 2
  • 5
  • 17
6
votes
2 answers

Persistent /etc/passwd on a docker container

I have create a docker image that allows users to connect on it with SSH. For security reason, I'd like to users can change their password. I only use docker named volumes, so I can't bind /etc/passwd and I don't want to mount all /etc Any ideas?…
lama02
  • 161
  • 2
  • 8
6
votes
2 answers

Find when password expires with ldapsearch

Is there a way to determine when an LDAP password is set to expire with ldapsearch? I haven't been able to see anything in man pages that would allow me to get this information. I see warning messages in /var/log/secure that warn of when a password…
user3299633
  • 2,971
  • 3
  • 24
  • 38
6
votes
3 answers

Change linux password in a script, quietly

As part of trying to implement a security measure in my root ssh session, I'm trying to devise a method of starting a script after n seconds of root user login, and change the user password and logout the user automatically. I'm getting stuck at…
Joel G Mathew
  • 7,561
  • 15
  • 54
  • 86
1
2 3
9 10