Scripted passwd but it won't really be quiet!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Scripted passwd but it won't really be quiet!
# 1  
Old 11-14-2008
Scripted passwd but it won't really be quiet!

First off, sorry if this is in the wrong forum.

I have made a script that will always set the password back to a specified value when I log in as root, this is because for testing purposes I regularly change it as I'm logged in..but this isn't the point.

The thing that's bothering me is that the way I've done is:
passwd < the_password_is_here

where the_password_is_here has:
password
password

However, I want the whole passwd process to be quiet and not print anything to the screen.

Using:
passwd < the_password_is_here > dump
or
passwd < the_password_is_here | > dump

Did not work.
I'm assuming what's fundamentally wrong is the way I'm passing in a text file like that to circumvent me having to type the password in. If that's the case...what do I do to make it change my root password but not say a peep on the screen?
# 2  
Old 11-14-2008
echo "passwd" | passwd --stdin [ user ] > /dev/null
# 3  
Old 11-14-2008
My passwd doesn't accept the option for --stdin when I tried it a few days ago.
# 4  
Old 11-17-2008
Does anyone have any other suggestions?
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Bash script won't run because hardware won't produce display

Can anyone offer any advice on how to modify the script below to work on a new system we have, that has no graphics capability? We admin the system through a serial RAS device. I've tried running the below script through the RAS and through an ssh -X session. It failed with something like "GTK... (3 Replies)
Discussion started by: yelirt5
3 Replies

2. Red Hat

"rhgb quiet" controlling the display of commands in single user mode ?"rhgb quiet" controlling the d

Why does removing "rhgb quiet" from the kernel boot parameters control whether or not the commands I enter are displayed in single user mode ? For instance, if I do not remove "rhgb quiet", when I am in single user mode, whatever command I type will not be displayed on the screen. The... (0 Replies)
Discussion started by: Hijanoqu
0 Replies

3. Shell Programming and Scripting

Scripted change of Oracle password on expiry

Hi All, I want to write a shell script to change the password on list of database servers, please guide me how do I achieve this. Please see below sample, how it is asking while manually changing the password, sqlplus test@oracle SQL*Plus: Release 9.2.0.2.0 - Production on Thu Jun 16... (4 Replies)
Discussion started by: gr8_usk
4 Replies

4. Shell Programming and Scripting

difference between "QUIET=${QUIET:-yes}" and "QUIET=yes"

Hi, Can anyone tell me the difference between QUIET=${QUIET:-yes} and QUIET=yes . Regards, akash (2 Replies)
Discussion started by: akash_mahakode
2 Replies

5. Shell Programming and Scripting

Shell Scripted Document Management System

Over the past 4 -5 years, I have cobbled together a rudimentary 'Document Management System' for a school district I support using Linux Bash Shell scripts.. The purpose of the scripting was to supplement features of a Job Applicant Center that had very simplistic methods of handle file... (1 Reply)
Discussion started by: rmuledeer
1 Replies

6. AIX

won't mount /usr...won't boot fully

Hello: NOOB here. I attempted to use smit mkcd. Failed on first attempt, not enough space. 2nd attempt tried to place iso on /usr, not enough space there. Cleanup ran for about 5 minutes after aborting. Now AIX won't boot. LCD display on 7029-6E3 says: 0517 MOUNT /USR. Attempted to boot from CD... (11 Replies)
Discussion started by: bbird
11 Replies

7. Shell Programming and Scripting

diffrent results between command line and scripted grep

When I type a command at the command line it supplies one result and the exact same command in a script egrep '^01|^02|^03|^04' file > fileout count = 29353 same count in the script yields a count of 23492 is there any reason this could be happening. (1 Reply)
Discussion started by: r1500
1 Replies

8. UNIX for Dummies Questions & Answers

Quiet System for Maintenance

I have backups that run in a cron @ midnight. Does the backup utility make sure that the system is quiet --(no users are logged on) or do I need to add some stuff to make sure nobody is accessing those file while they are being backed up. (3 Replies)
Discussion started by: michieka
3 Replies

9. UNIX for Dummies Questions & Answers

Sun E 10000 scripted shutdown

Howdy all. I am trying to configure a command file to be executed from a Sparc station to an E10000 to shut down at the same time. I do not have the hardware in which to actively test the script, but I do need some guidance, and Sun's documention on the E10000 leaves alot to be desired. Here... (1 Reply)
Discussion started by: redfoot
1 Replies
Login or Register to Ask a Question