Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Is it possible to "clone" a linux user with useradd? My problem is, when I create a new user who isn't the original user, then:
1) The sound doesn't work
2) The menu bars aren't the same
3) The internet/wireless icon doesn't show up
My main problem is that the sound doesn't work. Weird?
The sound problem might be caused by the new user not beeing in the group "sound".
And here's a little guide from ambience.sk too clone user:
How to copy / clone user account in Linux?
Task: Copy / clone user account, so the both users have the very same settings in their user home directory.
Copying of the user's home directory (e.g. olduser) to new user (e.g. newuser) is easy:
1. Create new user: adduser newuser
2. Copy all special hidden (dot) files to new user's home directory: cp --recursive /home/olduser/.[a-zA-Z0-9]* /home/newuser
3. Copy other standard files to new user directory: cp --recursive /home/olduser/* /home/newuser
4. Set new user's directory and files owner to new user for hidden dot files: chown --recursive newuser:users /home/newuser/.*
5. Set new user's directory and files owner to new user for normal files: chown --recursive newuser:users /home/newuser/*
You are done. In some cases you would need to change user group (users in this case).
Now just logout and try to login as the new user. All the settings for the programs should be the very same as for the old user. You can for example compare the settings by running KDE and checking the wallpaper and other settings of the new user. If the copying of the user folder was successful, everything will look the same.
I guess it would be possible to create the new user, and then copy all the hidden folders (the ones that contain the user configuration for each piece of software) from the first user's home folder to the new user's. But wouldn't it make more sense to work on the core problem about the sound?
I followed the instructions, but I've run into this problem:
when I am in /home/user2, I type "sudo chown -RP user2 *" and "sudo chown -RP user2 .*" and all the files become owned by user2. BUT, when I go back into /home/user1 all of THOSE files are now owned by user2! So I do the same thing to change them back, but again. I don't understand why changing them in one directory is changing them in the other directory?
If I omit the "-R", it works, but of course, it only changes the top level directories. I still can't log on as user2, because the files in the directories are owned by user1.
I created a user test2user using the above command, here are the results
useradd -D to see defaults used when creating a new user
edit /etc/default/useradd to edit and change defaults
I think the greatest hindrance to cloning is this key problem: What do you name the clone? You can't give it your own name, but at the same time, is another name satisfactory? The Prestige is a movie that makes good headway on this.
oh, and thank you very much for the help, I've been able to create a new user. Although I still don't get why chowning in one directory recursively would change the ownership of files in a neighboring directory....