Sponsored Content
Full Discussion: how passwd cmd is working
Operating Systems Linux Red Hat how passwd cmd is working Post 302436287 by Scrutinizer on Saturday 10th of July 2010 12:25:34 PM
Old 07-10-2010
If you look at the permissions of the passwd command (I'll just list the one on my system):
Code:
ls -l $(which passwd)
-rwsr-xr-x 1 root root 37140 2010-01-26 18:09 /usr/bin/passwd

you'll notice there is an "s" present which means the setuid bit is set. So ordinary users can call this program but it will be executed as user root.
This User Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Why passwd isnt working in shell scripts?

I had to write a script to change my login password, and the script wasnt working fine. When I searched through the previous postings in this forum, I got the solution (using 'expect' tool). But I would like to know why passwd command isnt working in scripts? (1 Reply)
Discussion started by: Deepa
1 Replies

2. Shell Programming and Scripting

su cmd not working

HI all, i want to run various Unix cmds thru a java prg. following is the code which i have written. ------------------------------------------------------------------- import java.io.*; class Run { public static void main(String args) { String ls_str; try{ Process cmd_su =... (1 Reply)
Discussion started by: sonbag_pspl
1 Replies

3. UNIX for Dummies Questions & Answers

passwd command not working

Hello All, I am working on Sco unix version 5.0.5. The passwd command has somehow got corrupted and is only displaying the contents of the /etc/passwd file instead of changing the password. I wanted to know if there is any other command through which you can change the password of a user from... (5 Replies)
Discussion started by: rahulrathod
5 Replies

4. Shell Programming and Scripting

Find cmd not working as expected

Hi, i wan to search the file starting with Admin into the directory Output. I am running below command: find /appl/Output -name "Admin*" -prune but this command is going into the sub directories present under output. I do not want to search under sub directories. Any help will be highly... (6 Replies)
Discussion started by: Vishal123
6 Replies

5. Solaris

Find cmd working in Linux and not in SunSolaris 5.8

find . -type f -mtime -1 -ls command not working in sun solaris 5.8 (4 Replies)
Discussion started by: navjotbaweja
4 Replies

6. Shell Programming and Scripting

Find cmd not working correctly in script

I am trying to copy 2 types of files so I can archive them. I tested with a set of commands: touch -t $(date -d "-60 day" +%Y%m%d) WORKDIR/REF find TARGETDIR/ -type f -maxdepth 1 -iname \*.out\* -or -iname \*.log\* ! -newer WORKDIR/REF -exec ls -l {} \; This correctly lists any files in the... (2 Replies)
Discussion started by: prismtx
2 Replies

7. UNIX for Dummies Questions & Answers

Passwd command not working

on Runnning passwd command on HPUX 11.23 I am getting pam_chauthtok: Shared object load failure. Pls help ... (1 Reply)
Discussion started by: ultimatix
1 Replies

8. Solaris

passwd cmd reenables passwd aging in shadow entry

Hi Folks, I have Solaris 10, latest release. We have passwd aging set in /etc/defalut/passwd. I have an account that passwd should never expire. Acheived by emptying associated users shadow file entries for passwd aging. When I reset the users passwd using passwd command, it re enables... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

9. Solaris

[Solved] passwd command not working

Hi all, I have got a problem, i have Solaris 8 server, where on running the passwd command, it says permission denied. I have checked /bin/passwd, /etc/passwd, /etc/shadow all have permissions as like one working server. It is happening for root user and all other users. i have tried... (6 Replies)
Discussion started by: varunksharma87
6 Replies

10. Shell Programming and Scripting

Sendmail cmd for html body and attachment not working

Hi, I am having trouble in sending a mail with html body and attachment (csv file). We don't have uuencode or mutt (not allowed to install as well) The below code is perfectly working for sending the html body alone: export MAILTO=abc@xyz.com export CONTENT="/home/abc/list.html"... (2 Replies)
Discussion started by: close2jay
2 Replies
PASSWD.CONF(5)						      BSD File Formats Manual						    PASSWD.CONF(5)

NAME
passwd.conf -- password encryption configuration file SYNOPSIS
passwd.conf DESCRIPTION
The /etc/passwd.conf file, consisting of ``stanzas'', describes the configuration of the password cipher used to encrypt local or YP pass- words. There are default, user and group specific stanzas. If no user or group stanza to a specific option is available, the default stanza is used. To differentiate between user and group stanzas, groups are prefixed with a single colon (':'). Some fields and their possible values that can appear in this file are: localcipher The cipher to use for local passwords. Possible values are: ``old'', ``newsalt,<rounds>'', ``md5'', ``sha1,<rounds>'', and ``blowfish,<rounds>''. For ``newsalt'' the value of rounds is a 24-bit integer with a minimum of 7250 rounds. For ``sha1'' the value of rounds is a 32-bit integer, 0 means use the default of 24680. For ``blowfish'' the value can be between 4 and 31. It specifies the base 2 logarithm of the number of rounds. If not specified, the default value is ``old''. ypcipher The cipher to use for YP passwords. The possible values are the same as for localcipher. If not specified, the default value is ``old''. To retrieve information from this file use pw_getconf(3). FILES
/etc/passwd.conf EXAMPLES
Use SHA1 as the local cipher and old-style DES as the YP cipher. Use blowfish with 2^5 rounds for root: default: localcipher = sha1 ypcipher = old root: localcipher = blowfish,5 SEE ALSO
passwd(1), pwhash(1), pw_getconf(3), passwd(5) HISTORY
The passwd.conf configuration file first appeared in NetBSD 1.6. The default value of localcipher was set to ``sha1'' in /etc/passwd.conf starting from NetBSD 6.0. BSD
December 3, 2010 BSD
All times are GMT -4. The time now is 12:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy