Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2002
    Location
    Fribourg Switzerland
    Posts
    1

    Question Unanswered: How to write a shell script to do a non interactive login

    How can I write a shell script in order to do a non interactive login, with a specific user name and password. Execute a local existent shell scrip with the logged user environment. I would like to do the same for five different user at the same Unix AIX computer.

    Thanks and best regards

    Mrs. Guadalupe brodbek

    Guadalupe.deBrodbek@swisscom.com


  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    I am more familiar with solaris but I will give AIX a shot:

    The following is based on AIX 5.1.0:

    You can try the global environment files:

    /etc/profile and /etc/environment - just modify the script to check for the user(s) you want to include in this group. Also, there is a skeleton script file created under /etc/security/.profile. A configuration for security exists for users under /etc/security/user.

    Well, I hope this helps. I have used the /etc/profile script to add additional functionality to help me with specific users.

    Good luck.

  3. #3
    Join Date
    Apr 2002
    Posts
    17
    From the root account the following should work:

    su - <username> -c <command>


    Hope this helps,
    Geoff

  4. #4
    Join Date
    Aug 2002
    Location
    UK
    Posts
    87
    If you connecting from a different Unix box then you could set up a remote shell and use the 'rsh' command. This allows you to run scripts on a different machine without having to login.

    (HP-UX you need to use the command 'remsh')

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •