This is the old SliTaz forum - Please use the main forum.slitaz.org

[SOLVED] adding new user
  • cdaaawgcdaaawg February 2010
    When I add a new user after installing Slitaz to disk and then try to login as that user, an error message flashes and I am bounced back to the login screen. The message is too fast to catch, but it does say something about login failure.

    EDIT:
    The message is:
    Failed to execute login command
  • LuXLuX February 2010
    Hello cdaaawg,

    I think that your new user is probably lacking the configuration files needed to start an X sessions, among which the most important in Slitaz is ~/.xinitrc. Please login as tux (or any working user), open a terminal and check the content of the home directory of your new user. If something is lacking (and probably everything is lacking) copy all the content in /etc/skel in the home of your new user and give it the right owner and group. This should fix the problem.

    I can give you more details if you don't know how to do it with command line instructions.

    Sheers,
    LuX.
  • cdaaawgcdaaawg February 2010
    Will give it a try, LuX. Thanks for the info. I see there is a lot of content in /etc/skel and some in /home/tux that didn't get copied to the new user's $HOME directory. Isn't all the content in /etc/skel normally copied to a newly created user's $HOME directory? Is this a bug in Taz? Thanks so much for the help.

    Carl
  • cdaaawgcdaaawg February 2010
    For anyone needing assistance, here are the bash commands I used to copy, then change ownership of all necessary files and directories (hidden included):
    Must be root!
    su root

    Copy all files:
    cp /etc/skel/.*?? /home/username/

    Change ownership of all files and directories in the user's home
    chown username /home/username/.*??

    Hope this helps,
    Carl
  • CarlCarl February 2010
    In reality, the solution I presented will not work in all instances. It will fail if there are files or directories with a single character such as `.a'. To get around this invoke the following:
    su root

    Set shell options to allow the dot (.) to be included in file name expansion when using globbing:
    shopt -s dotglob

    Change to the home directory for username
    cd /home/username

    Recursively copy all files and directories:
    cp -r /etc/skel/* /home/username

    Change ownership and group of all files and directories recursively:
    chown -R username:username /home/username/*

    Sorry if I caused anyone grief, it was purely unintentional.
  • CarlCarl February 2010
    Oops, forgot to change the shell options back:
    shopt -u dotglob
  • tikbalangtikbalang April 2010
    i don't have "shopt" command. what package should i download? i'm also trying to solve "failed to execute login command" problems.
  • Hi,
    I don't think you really need "shopt", just follow Lux's instructions.

    Cheers
    Stephane
  • tikbalangtikbalang April 2010
    i've done that but i still get the error when logging in as tux. what i did was to cp /etc/skel to /home/tux the chowned the folders/files to tux ownership --- all this as root.
  • Humm, just to make sure, would you mind:

    a) posting the output of the command?

    # ls -al /home/tux/.*


    b) confirm that this is not a password issue?
  • LuXLuX April 2010
    Hi,

    I have also experienced some troubles in managing new users with Slitaz 3.0. Actually the /etc/skel directory contains a lot of useless files, but not the mandatory .xinitrc file (and the .config/slitaz/applications.conf file which is loaded by .xinitrc). So, after you have created your new users, you have to fill their home directories with the needed files as explained here:
    http://doc.slitaz.org/fr:handbook:systemutils#gestion-des-utilisateurs-et-groupes
    This is a french page, so I report below the usefull part. If your new user has login name "pomme" with home directory /home/pomme you can repeat the following commands (as root):
     # rmdir /home/pomme
    # cp -a /etc/skel /home/pomme
    # cp /root/.xinitrc /home/pomme
    # mkdir -p /home/pomme/.config/slitaz
    # cp -a /etc/slitaz/applications.conf /home/pomme/.config/slitaz
    # chown -R pomme:pomme /home/pomme

    Note that the first command, rmdir, completely removes the home/pomme but will work only if this directory is empty (which is the case if you did not modify it already). This directory is re-created by the second command, "cp -a /etc/skel...", with the same content as /etc/skel. This is a trick to copy in /home/pomme all the content of /etc/skel without omitting the subdirectories and the files whose name start with a ".". Indeed these files won't be copied by the more natural command used by Carl:
     # cp -r /etc/skel/* /home/username

    This can be refined. Personally I didn't want to copy in the home directories of my users all the unnecessary files which are (and shouldn't be) in /etc/skel. So before applying the above procedure I moved this directory (just to keep a backup of it in case of) and created a new /etc/skel with only the files that I wanted to include:
     # mv /etc/skel /etc/skel.ori
    # mkdir /etc/skel
    # cp /etc/skel.ori/.gtkrc* /etc/skel/
    # cp /etc/skel.ori/.profile /etc/skel/
    # cp /etc/skel.ori/.Xdefaults /etc/skel/
    # cp /etc/skel.ori/.profile /etc/skel/
    # cp /root/.xinitrc /etc/skel/
    # mkdir /etc/skel/.config
    # cp -R /etc/slitaz /etc/skel/.config/
    # mkdir /etc/skel/Desktop

    Then I replaced the user's directory by a copy of this /etc/skel, modified the owner and restarted:
    # rmdir /home/pomme
    # cp -a /etc/skel /home/pomme
    # chown -R pomme:pomme /home/pomme


    Regards,
    LuX.

    PS : The fact that /etc/skel does not contain the right files by default can be considered as a bug, IMHO.
  • tikbalangtikbalang April 2010
    thank you toto and lux. i have used instead slitaz-3.0-xvesa.iso and solved my problems and gives me more choices on resolution.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social