Results 1 to 3 of 3

Thread: Configuration (new user defaults) assistance needed.

  1. #1
    Join Date
    Jul 2010
    Location
    Florida
    Posts
    22

    Default Configuration (new user defaults) assistance needed.

    I am working on setting up my home network to be centrally managed from my server (Opensuse 11.3).

    What I want is for all newly created accounts to automatically have an entry (in .profile I assume, is there a better location?) that runs a script on login, but I do not know where to find the default .profile at to modify it.

    So far I have /etc/skel, /etc/zypper/repos.d, and /var/cache/zypp/packages on the server exported to each PC via NFS. /etc/skel doesnt have anything but the bin and public_html folders in it.

    On another note, I am writing a shell script to check for the mount entries in fstab and add them if they are not there, how do you test for a string within a file? (using BASH)

  2. #2

    Default Re: Configuration (new user defaults) assistance needed.

    Quote Originally Posted by Avanesov79 View Post
    What I want is for all newly created accounts to automatically have an entry (in .profile I assume, is there a better location?) that runs a script on login, but I do not know where to find the default .profile at to modify it.
    /etc/skel/.profile.


    On another note, I am writing a shell script to check for the mount entries in fstab and add them if they are not there, how do you test for a string within a file? (using BASH)
    Code:
    grep -q 'string' file && echo "string is there"
    grep -q 'string' file || echo "string is not there"

  3. #3
    Join Date
    Jul 2010
    Location
    Florida
    Posts
    22

    Default Re: Configuration (new user defaults) assistance needed.

    Ok, I feel like an idiot...I forgot to check "show hidden" in my browser when looking through /etc/skel

    Thanks for the reply and the code.

Posting Permissions

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