Sponsored Content
Top Forums Shell Programming and Scripting auto login to Super User account Post 302298958 by robsonde on Wednesday 18th of March 2009 11:41:23 PM
Old 03-19-2009
Putting the root password in a script is very bad.

Don't do it.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

freebsd auto login user at boot / i'm stuck

I run freebsd 4.8 and try to find the way or 'a' way to log in a certain user i created automaticaly at pc boot. I have searched the net, the manuals, but found nothing... could anyone please get me going by showing me an example or what file(s) i need to take a look at. i am not working... (6 Replies)
Discussion started by: termiEEE
6 Replies

2. UNIX for Dummies Questions & Answers

Setting an account to be a non-login account automatically?

Is there a way to easily change an account to be a non login account (NP in the shadow) file? I know I can just edit the file but that is not what we want to do. We use access control software and want to provide a way to set an account to be non-login using simple commands that can be mapped... (0 Replies)
Discussion started by: LordJezo
0 Replies

3. Solaris

solari s 10 auto account locking

does anyone know in solaris 10, can you lock an account if the user does not change their password within a certain amount of time? What i want to do is, if a user doesnt change their password within 90 days, i want the account locked. This is similar to the redhat linux passwd -i command. ... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

4. AIX

AIX; Auto clearing of 'too many invalid login attempts by user'

Does anyone have a good script / cron job that handles this? I have looked in smit and see it is clearing this count with: chsec -f /etc/security/lastlog -a "unsuccessful_login_count=0" -s '{userid}' However when I looked around to find ways to automate this I have not found an easy... (0 Replies)
Discussion started by: Keith Johnson
0 Replies

5. Linux

Auto create local account with winbind.

Hi, I have a set up a linux box connected to windows active directory using winbind. Everything is up and running fine. Now i wish to auto create a local account whenever a new user logs in. I have tried every possible way using the smb.conf to no avail. Any help would be appreciated. (1 Reply)
Discussion started by: d_ark
1 Replies

6. Shell Programming and Scripting

How do i change to super user then revert back to ordinary user ,using shell script?

Hi all, I am trying to eject the cdrom from a livecd after certain stage... Now assuming that it is possible to eject,please consider my issue!!! The OS boots into a regular user by default...so i am unable to use the eject command to push out the drive... However if i try pfexec eject it... (3 Replies)
Discussion started by: wrapster
3 Replies

7. Debian

password less login to root from a user account

hello friends, one user is created named "user1" I login as "user1" . Now when i do "su -" to be root user I have to give password for root . Is there any way through which we can skip giving the password to root. i.e. user1@work:~$ su - Password: xxxxxx work:~$ I don't want that... (1 Reply)
Discussion started by: pradeepreddy
1 Replies

8. UNIX for Dummies Questions & Answers

User account with no login shell

Hi All, I was reading a tutorial for Installing Tomcat on Linux machine. (http://www.puschitz.com/InstallingTomcat.html) Here the author had mentioned that: For security reasons I created a user account with no login shell for running the Tomcat server. My question is: 1. What is a User... (6 Replies)
Discussion started by: jw_amp
6 Replies

9. AIX

User Account Login Login on your AIX server

I want to learn AIX. I would like to find someone who would be willing to give me a login to their AIX home lab server. My intent is to poke around and discover the similarities and differences of AIX compared to other *NIXs. I am a UNIX admin so I can think of what some immediate concerns may... (1 Reply)
Discussion started by: perl_in_my_shel
1 Replies

10. Solaris

Solaris 11 user account login expired

Hi everyone Please i need urgent help... I have installed solaris 11 using live media.. then i installed sunray.. every thing is fine.. but after system reboot i am unable to login on server on GUI it gives account expired error or some time authentication failed... but i can log in through... (11 Replies)
Discussion started by: amk
11 Replies
PASSWD(1)							  User utilities							 PASSWD(1)

NAME
passwd - update a user's authentication tokens(s) SYNOPSIS
passwd [-k] [-l] [-u [-f]] [-d] [-n mindays] [-x maxdays] [-w warndays] [-i inactivedays] [-S] [username] DESCRIPTION
Passwd is used to update a user's authentication token(s). Passwd is configured to work through the Linux-PAM API. Essentially, it initializes itself as a "passwd" service with Linux-PAM and uti- lizes configured password modules to authenticate and then update a user's password. A simple entry in the Linux-PAM configuration file for this service would be: # # passwd service entry that does strength checking of # a proposed password before updating it. # passwd password requisite /usr/lib/security/pam_cracklib.so retry=3 passwd password required /usr/lib/security/pam_unix.so use_authtok # Note, other module-types are not required for this application to function correctly. OPTIONS
-k The option, -k, is used to indicate that the update should only be for expired authentication tokens (passwords); the user wishes to keep their non-expired tokens as before. -l This option is used to lock the specified account and it is available to root only. The locking is performed by rendering the encrypted password into an invalid string (by prefixing the encrypted string with an !). --stdin This option is used to indicate that passwd should read the new password from standard input, which can be a pipe. -u This is the reverse of the -l option - it will unlock the account password by removing the ! prefix. This option is available to root only. By default passwd will refuse to create a passwordless account (it will not unlock an account that has only "!" as a password). The force option -f will override this protection. -d This is a quick way to disable a password for an account. It will set the named account passwordless. Available to root only. -n This will set the minimum password lifetime, in days, if the user's account supports password lifetimes. Available to root only. -x This will set the maximum password lifetime, in days, if the user's account supports password lifetimes. Available to root only. -w This will set the number of days in advance the user will begin receiving warnings that her password will expire, if the user's account supports password lifetimes. Available to root only. -i This will set the number of days which will pass before an expired password for this account will be taken to mean that the account is inactive and should be disabled, if the user's account supports password lifetimes. Available to root only. -S This will output a short information about the status of the password for a given account. Available to root user only. Remember the following two principles Protect your password. Don't write down your password - memorize it. In particular, don't write it down and leave it anywhere, and don't place it in an unencrypted file! Use unrelated passwords for systems controlled by different organizations. Don't give or share your password, in particular to someone claiming to be from computer support or a vendor. Don't let anyone watch you enter your password. Don't enter your password to a computer you don't trust or if things Use the password for a limited time and change it periodically. Choose a hard-to-guess password. passwd will try to prevent you from choosing a really bad password, but it isn't foolproof; create your password wisely. Don't use something you'd find in a dictionary (in any language or jargon). Don't use a name (including that of a spouse, parent, child, pet, fantasy character, famous person, and location) or any variation of your personal or account name. Don't use accessible information about you (such as your phone number, license plate, or social security number) or your environment. Don't use a birthday or a sim- ple pattern (such as backwards, followed by a digit, or preceded by a digit. Instead, use a mixture of upper and lower case letters, as well as digits or punctuation. When choosing a new password, make sure it's unrelated to any previous password. Use long pass- words (say 8 characters long). You might use a word pair with punctuation inserted, a passphrase (an understandable sequence of words), or the first letter of each word in a passphrase. These principles are partially enforced by the system, but only partly so. Vigilence on your part will make the system much more secure. EXIT CODE
On successful completion of its task, passwd will complete with exit code 0. An exit code of 1 indicates an error occurred. Textual errors are written to the standard error stream. CONFORMING TO
Linux-PAM (Pluggable Authentication modules for Linux). Note, if your distribution of Linux-PAM conforms to the Linux Filesystem Standard, you may find the modules in /lib/security/ instead of /usr/lib/security/, as indicated in the example. FILES
/etc/pam.d/passwd - the Linux-PAM configuration file BUGS
None known. SEE ALSO
pam(8), and pam_chauthok(2). For more complete information on how to configure this application with Linux-PAM, see the Linux-PAM System Administrators' Guide at <http://parc.power.net/morgan/Linux-PAM/index.html> AUTHOR
Cristian Gafton <gafton@redhat.com> Red Hat Linux Jan 03 1998 PASSWD(1)
All times are GMT -4. The time now is 11:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy