# Logon issues , .bashrc for SAG versus other users

**URL:** <https://techcommunity.softwareag.com/t/logon-issues-bashrc-for-sag-versus-other-users/61623>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Linux\
**Created:** [October 26, 2006, 6:23am UTC](https://techcommunity.softwareag.com/t/logon-issues-bashrc-for-sag-versus-other-users/61623 "2006-10-26T06:23:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![papajohn](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/papajohn/32/85_2.png) [@papajohn](https://techcommunity.softwareag.com/u/papajohn)\
**Post date:** [October 26, 2006, 6:23am UTC](https://techcommunity.softwareag.com/t/logon-issues-bashrc-for-sag-versus-other-users/61623/1 "2006-10-26T06:23:53Z")

</div>

I’m Wondering how other Natural Linux installations using the bash shell have their .bashrc setup. We have been using the userid SAG to login to Linux, and all works fine. Now that we’re setting up different userid’s and with that, also creating different .bashrc scripts(files?), now we’re not able to get logged into Natural. Changing the ‘sag’ entries in the path statements in the .bashrc with different userid doesnt work, this gives us “NATURAL startup error 39: Unable to find NATDIR and/or NATVERS environment variable- snip” I know that all SAG products reside in the SAG path, how do I setup another .bashrc file for non SAG user? How do other Natural/Linux shops using bash have their .bashrc’s setup?  
\*\* Update \*\* Under Installing Natural Security under Linux \*\*  
I did read where I needed to update the .profile with . $SAG/sagenv  
and I did that according to the docs:  
“Enter the following command line in the .profile file of each user who will use this environment permanently: $SAG/sagenv”  
now receiving “SAG lic not found”  
Probably another environment variable that needs to be set… or permissions, :roll:

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Matthias1](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Matthias1](https://techcommunity.softwareag.com/u/Matthias1)\
**Post date:** [October 27, 2006, 5:29pm UTC](https://techcommunity.softwareag.com/t/logon-issues-bashrc-for-sag-versus-other-users/61623/2 "2006-10-27T17:29:04Z")

</div>

I don’t know, if you are a Linux expert or not. So sorry, if I tell you things you already know.

The thing with .profile only works …

1. … if $SAG is set before calling $SAG/sagenv
2. … if the script sagenv is called with dot+space. Like this:

```auto
. $SAG/sagenv
```

The dot and the space is mandatory. It forces Linux not to create a subshell for the following command.

---

<div class="post-metadata">

**Author:** ![papajohn](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/papajohn/32/85_2.png) [@papajohn](https://techcommunity.softwareag.com/u/papajohn)\
**Post date:** [October 27, 2006, 11:32pm UTC](https://techcommunity.softwareag.com/t/logon-issues-bashrc-for-sag-versus-other-users/61623/3 "2006-10-27T23:32:05Z")

</div>

Mathias, I’m no expert in linux that’s for sure, just trying to figure all this out. I was a mainframe natural programmer for about 5 years before becoming a dba.  
I appreciate the response, and will look at our .bashrc and .profile to see if we’ve got them setup like you show above.  
I’m pretty sure that each userid created will need it’s own .profile,  
but what about .bashrc, does each userid need it’s own .bashrc as well?  
I’m still a little confused about what’s required and more importantly what works.  
Does linux read the .profile first or the .bashrc, guess I need to read up on the linux O/S also.

---

<div class="post-metadata">

**Author:** ![Curtis\_Pew](https://avatars.discourse-cdn.com/v4/letter/c/5f9b8f/32.png) [@Curtis\_Pew](https://techcommunity.softwareag.com/u/Curtis_Pew)\
**Post date:** [October 28, 2006, 1:45am UTC](https://techcommunity.softwareag.com/t/logon-issues-bashrc-for-sag-versus-other-users/61623/4 "2006-10-28T01:45:42Z")

</div>

From the bash man page:

> [@](#):
>
> ```
> When bash is invoked as an interactive login shell, or as a non-inter-
> active shell with the --login option, it first reads and executes com-
> mands from the file /etc/profile, if that file exists. After reading
> that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
> in that order, and reads and executes commands from the first one that
> exists and is readable. The --noprofile option may be used when the
> shell is started to inhibit this behavior.
> 
> ```

> [@](#):
>
> ```
> When an interactive shell that is not a login shell is started, bash
> reads and executes commands from ~/.bashrc, if that file exists. This
> may be inhibited by using the --norc option. The --rcfile file option
> will force bash to read and execute commands from file instead of
> ~/.bashrc.
> 
> ```

---

<div class="post-metadata">

**Author:** ![papajohn](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/papajohn/32/85_2.png) [@papajohn](https://techcommunity.softwareag.com/u/papajohn)\
**Post date:** [October 28, 2006, 3:04am UTC](https://techcommunity.softwareag.com/t/logon-issues-bashrc-for-sag-versus-other-users/61623/5 "2006-10-28T03:04:29Z")

</div>

Ah yes, the man (manual) pages,  
Thanks Curtis

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:40pm UTC](https://techcommunity.softwareag.com/t/logon-issues-bashrc-for-sag-versus-other-users/61623/6 "2021-04-02T14:40:54Z")

</div>

Closed on April 2, 2021, 2:40pm UTC


