Brocade Fibre Channel Networking Community

Expand all | Collapse all

Problem with commands run under a user defined role (FOS 8.1.2a)

  • 1.  Problem with commands run under a user defined role (FOS 8.1.2a)

    Posted 01-08-2019 08:22 AM

    Hi guys

     

    I stumbled upon a strange problem when using a user in a user defined role.

    I ceated a new user defined role which is basically a copy of the 'user' role with the addition of 2 extra permissions allowing cedrtain commands to be used.

    For testing purposes I logged in with the new user and tested all the new commands plus somes 'old' ones - so far so good.

    Now, we have a script thats runs from outside our switches and executes certain commands like "switchshow" or "version", via SSH, collects the output and puts it into a database. Since we changed to gropu of the user from 'user' to our newly created user defined gruop I get the following problem when running the script:

     

    ERROR: Failed to get switch info switchshow: Could not chdir to home directory /fabos/users/udrole: Permission denied

    rbash: /fabos/users/udrole/.bashrc: Permission denied

    rbash: switchshow: command not found

     

    I know there was an error regarding the same directory a while ago which was fixed in 8.1.0 (DEFECT000618708).

    But maybe it is similar to this fixed defect.

     

    Any ideas are appreciated.

     

     

    Cheers
    Peter


    #BrocadeFibreChannelNetworkingCommunity


  • 2.  Re: Problem with commands run under a user defined role (FOS 8.1.2a)

    Posted 01-09-2019 07:41 AM

    I would recommend running the script manually from the same location the script is located. Meaning, line by line.

     

    I use a custom VBA script and on occassion I find that the formatting of the "send" needs to be adjusted.


    #BrocadeFibreChannelNetworkingCommunity