Sponsored Content
Full Discussion: Help with su
Top Forums UNIX for Advanced & Expert Users Help with su Post 302291801 by Taranjeet Singh on Thursday 26th of February 2009 10:57:24 AM
Old 02-26-2009
Help with su

Hi,

I already tried using sudo but i don't have access to it,so that's why i am compelled to use it with su..

Is there no way out by which we can pass the password along with the username while using su....
 
su(1)							      General Commands Manual							     su(1)

Name
       su - substitute a user ID

Syntax
       su [username]

       su - [username]

       su -f [username]

Description
       The  command  requests the password of the specified username.  If the correct password is given, changes to that username without changing
       the current directory.  The user environment is unchanged except for HOME and SHELL which are taken from the password file entry for  user-
       name.   The  shell  that  is  run  is also taken from the password file entry for username.  The new user ID stays in force until the shell
       exits.

       If no username is specified, `root' is assumed.	To remind the superuser of his responsibilities, the shell substitutes `#' for	its  usual
       prompt.

Options
       -f   Prevents from executing the .cshrc file, making start up faster.

       -    Simulates a full login.

Diagnostics
       Sorry
	    An invalid password was supplied for the specified username.

       Unknown login: username
	    The specified username was not found in the passwd database.

       No directory
	    The home directory for the username is not accessible at this time (only with ``-'' argument).

       No shell
	    The shell specified in the passwd database entry for username could not be executed.

       Kerberos initialization failure
	    Consult your system administrator.

       If enhanced security features are enabled the following error messages are also possible:

       Requires secure terminal
	    Attempt to su to UID 0 on a line that is not marked secure in

       User's password has expired
	    Access is denied because the password for username is expired.

       This account is disabled
	    Access is denied because the auth entry corresponding to username is marked disabled.

Files
       Log file of anyone who became
			root, with a date mark.

See Also
       csh(1), sh(1), passwd(5yp), environ(7), edauth(8)
       Security Guide for Administrators
       Security Guide for Users

																	     su(1)
All times are GMT -4. The time now is 01:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy