Ubuntu :: Changing The Username And Home Directory?
May 27, 2010
People usually suggest workarounds to do this, as it's not possible with usermod while the user is logged in. Did I overlook anything or is this method not preferable over creating a new account, setting the user permissions, then moving the files and messing with the file permissions? Using the right tool for the job would seem to be less error-prone to me. 1. Activate the root account by setting a password.
Code:
sudo passwd
2. Log out and log into the root account.
3. Change the username and home directory from user1 to user2. This will also move the files to the new home directory and rename the group to user2.
Code:
usermod -l user2 -d /home/user2 -m user1
i have problem on my ubuntu 10.10 after i change user name to root and home directory username ( old one ) , and now users and groups not working asnd all application on old user not working !
I have a dual-boot win7 and Ubuntu 10.10 and I want Ubuntu to use my windows user folder as home. I edited fstab to give me ownership and mount it to /mnt/Windows at startup but whenever I change the location of home in the Users and Groups it acts like it is changing it but it never does. I close the settings and when I re-open it, it is set back to /home/me.
I tried to download Knoppix 6.0 iso, but it ran out of storage space. It was placing it into /tmp. Is there a way that I could have it placed in my /home directory, which is plenty big?
I was setting up a Samba server and I ran into some problems with SELinux related to the context of the home directories. I made a user account, say "UserAccount", with a default home directory "home/UserAccount". Afterwards I realized that I needed to move the home directory of this particular user to another location, say "/home2/UserAccount". So I created the new directory, changed the permissions, and used Gnome's system-config-user to change the user's home directory.
I then set-up the Samba server, activated samba_run_unconfined and samba_enable_home_dirs in SELinux, and made an account for UserAccount. When testing the Samba account for UserAccount SELinux denied read access. I checked the context and the new home directory did not appeared to have been updated. I had to manually run:
restorecon -R -v /home2/UserAccount
to set the context on the new home directory. I'm not very familiar with SELinux, so my question is this: is this normal security policy or is a bug in the system-config-user tool? If it's normal policy can someone explain why? I'm always ready to learn Distro: Fedora 12 (kernel: 2.6.31.5-127.fc12.i686) System: Dual Intel Xeon @ 3.2 GHz, 1 GB RAM
Can't log into my XFCE desktop like I normaly do. all the sudden I get notified that my xsession lasted less then 10 secondsLooking at the error I can see this:
Unable to access file /home/username/.iceauthority: No such file or directory
Using failsafe I can start a terminal. From terminal I tried to start X
Code: sudo startx Result: Running on desplay:0
So I tried to run this;
Code: sudo startxfce4 And I get up a graphical desktop.
So this is not a critical situation as I easily can use this method to log on, but as there has been something causing this I would like to be able to resolve this nonetheless. Btw it is not the old chmod trick in play here, cause my .iceauthority file is gone alltogheter.
created a user but i forgot to change the home directory permission.so after user created when i go to the user and group mangement i cant see that permission filed related to the home permission directory.my purpose is to stop accessing other user to my home directory,how it can be possible??
I have an interdependent collection of scripts in my ~/bin directory as well as a developed ~/.vim directory and some other libraries and such in other subdirectories. I've been versioning all of this using git, and have realized that it would be potentially very easy and useful to do development and testing of new and existing scripts, vim plugins, etc. using a cloned repo, and then pull the working code into my actual home directory with a merge.
The easiest way to do this would seem to be to just change & export $HOME, eg
cd ~/testing; git clone ~ home export HOME=~/testing/home cd ~ screen -S testing-home # start vim, write/revise plugins, edit scripts, etc. # test revisions
However since I've never tried this before I'm concerned that some programs, environment variables, etc., may end up using my actual home directory instead of the exported one. Is this a viable strategy? Are there just a few outliers that I should be careful about?
I recently installed vsftpd on my server. I noticed that users on the machine can login into vsftpd with their username and password on the machine and go to their root dir "/home/username".Now, I want to give some people a vsftpd username and password so they can upload and download files and folders to their folder, but this folder has to be in the "/var/www/(username)" folder. I don't want them to be able to go to any other folder than their own folder like "/var", "/etc" or "/home" etc. Also I don't want them to be able to login on the machine as a user, through putty for example. They should only be allowed to acces their folder with vsftpd, nothing else.
I did these steps to change my username: I like to directly edit /etc/passwd and /etc/groups
First open a terminal, become root Code: sudo -i Now: Code: usermod -d /home/new -m old sed -i -e 's_old_new_g' /etc/passwd sed -i -e 's_old_new_g' /etc/group<- sed -i -e 's_old_new_g' /etc/shadow
My computer shut down after I did the second step and now my password isn't working! I cannot open my home folder or get back to root!
I went to YaST>Security and Users>User and Group Management and changed my username. Now I can't do anything (open home directory, start application, login, etc). I tried changing back the username by going to YaST at init 3 and changing back to the previous username.
I have a dual-boot macbook with an OS X partition and an ubuntu partition. When I first installed ubuntu, I changed my home folder to my OS X home directory to synchronize all my files from both. My home directory is now /media/sda2/Users/username/. In a regular home folder, the icons for Documents, Music, Pictures, Movies, etc. are different (not just with emblems, but actually different icons). But when I changed my home folder, these subfolders' icons stayed the same as regular folder icons and I can't figure out a way to change that default setting. I know how to change the icons for each folder manually, but these changes don't appear everywhere (i.e. nautilus, places, etc). Furthermore, every time I change my icon theme, I would have to manually reassign icons for these folders. Is there a way to globally change the folder icons for these folders?
I need to specify a different path to home directories on a particular server than what LDAP contains for the users, besides using a symlink. E.g. "/Users/jdoe" vs "/home/jdoe" I don't want to change the actual LDAP attributes, just want a particular server to point them in the right direction (Ubuntu 10.04).
I'm assuming it's something I could probably set in pam configurations?
Short Description: I wanted to see what would happen if I upgraded from Kubuntu 8.04 (32bit) to Ubuntu 10.4 (64bit) by copying my home directory then restoring it after the upgrade. It almost worked sans a few interesting problems that I'm hoping might teach me a bit more about how Ubuntu works.
Detailed Description:
1. I copied my home directory to another hard disk.
2. I let the installation disk for Ubuntu 10.4 (64bit) reformat and overwrite the disk that contained Kubuntu 8.04 (32bit) and chose to maintain the partition and swap size for that disk.
3. Once I worked out some bugs in the hardware and got the OS up and running smoothly, I "merged" my home directory with the backup I had created in step one. (Merge was an option given to me when I was attempting to paste the files copied from the backup disk.)
4. It should also be noted that I was trying for a while last night to install TrueCrypt. In order to do that I had to check its "sig" file. The GUI for the gpg installation was complaining that I didn't have gtk+-2.0 installed so I installed gtk (I think it might have been 2.4 or whatever the most recent one was) from source without any errors. It got late so I gave up on attempting to install TrueCrypt any further.
The Results: This morning the computer seemed to boot faster than it had been before, but I was left without a functioning Theme manager. It will open, and I can click on all of its features, but nothing seems to do anything. For example: If I right click on the desktop and choose "Change Desktop Background" Then select "Get more themes online", nothing happens. Also if I select the "theme" tab, there are only two themes listed when there used to be about 9 by default.
Questions: 1.) Is there a way to restore the files that are important for correct system operation (possibly all the files starting with a dot ".*") in my home directory to there default state like they would have been from a fresh install, but without doing a fresh install and without loosing any of the documents or archives in my home file?
2.) Is this even the correct approach or might this cause more problems? For example, if your computer had this problem would you try and restore the home directory, or would you troubleshoot each problem as it arises one at a time until everything became stable?
3.) What could I do next to continue troubleshooting the theme manager?
I'll keep researching and trying to find some links that can help while I wait for your responses. If I find anything that helps I'll post the fix here.
how I managed this, but somehow during a reinstall I changed the ownership of all my home stuff to root, instead of my normal username. So now nothing loads, unless I sudo it. I had to use sudo just to open firefox.
I have a strange problem when I do SSH to a FEDORA9 based Linux Server.
[Code]....
When I login using "adah" username in TELNET I am automatically directed to my home directory at location "/media/disk-1/home/adah". But when I use SSH to login using the same username I get the following message Code: Could not chdir to home directory /home/adahaj: Permission denied
I have a secondary disk which holds a /home directory structure from a previous install of Linux. I installed a new version on a new primary drive and mounted this secondary drive as the new /home. Problem is, even though the users are the same names and I can access the home directories for the users, I cannot login directly to their home directories, as I get the following error: -
Code:
login as: [me] [me]@[machine]'s password: Last login: Wed Jan 6 18:34:33 2010 from [machine] Could not chdir to home directory /home/[me]: Permission denied [[me]@[machine] /]$
Now, since the usernames are correct and the users are in the passwd file with the correct home directory paths, could it be user ID's that are different or something else? It's not as though I cannot access the home directories for the users, simply that I cannot log directly into them from a login prompt.
Is there anything special about a home directory before users' home directories are stored there, or is just as typical as any other "empty" folder?Let me just cut to the chase, but please no ear ringing about the folly of messing around as root, particularly with directories at root level. I know it's considered stupidity, but I deleted my home directory.
Is there an easy way to restore a working home directory? I tried copying /etc/skel under root, but I'm not sure what a home directory should look like once it has been restored. Besides . & .., there were .screenrc & .xsession in my home directory when I copied /etc/skel. Are these files suppose to be in "/home" or "/home/~" or both?
I have Ubuntu Karmic. I chose to install with an encrypted home directory. Recently I got a warning that I only had 2GB of drive space left. This is mostly because of my videos. So I went and bought a new hard drive and partitioned it and made 1 ext4 partition and copied my videos all to the new hard drive. I added a line in my fstab to mount the new hard drive to ~/videos, but when I reboot the computer, there is a screen saying something like "error mounting /home/me/videos, press S to skip or something else to reboot". If I press S to skip, then when my system comes up there is a video directory but it's empty because my other hard drive didn't get mounted. I can run sudo mount /dev/sdb video/ and it will mount fine and I can see all my videos, so why can't fstab mount it? Does this have something to do with my encrypted home directory?
I installed Fedora 12 a couple of days ago. This is my secondary operating system. The main one is Mint 8 and in order to have the same documents in both OSs I have a separate /home partition, but for some reason I don't see any of my Documents. In the installation I told fedora that I already had a /home partition and to use it. Also if I mount Mint's disk, while I can browse the folders, I can't see any document .
Finally I can access my Mint's home folder and files but since my username in fedora has a capital A it created another home folder. How can I change my home folder path so it point to the other home folder?
I have an external hard drive mounted at /media/exthdd/ On that hard drive I have folders: Music, Pictures, Videos, etc. Can I make symbolic links to /media/exthdd/Music/ to say the root directory /_ ? the directory /_ is empty I just want a quick method of typing to get me there much like [cd ~] gets me to my home/username folder. I have my music organized by Artist/Year-Album/Track.Title.mp3 I want to be able to "cd /_" then "ls" and see all Artist folders.
I am having a problem with two linux boxes I have. They are running Centos 5.3 and Centos 5.4. The problem is that when I log in, this file /etc/host, under the etc directory get appended the username I am logging in as, the IP address I am logging in from, and worse, the password in clear text.This is the format it uses:username@IP (password in clear text) [Tue Jan 12 2010 13:00:26 -0500]Is it possible for someone to tell me what is this about, and how to stop it?
I'm sorry if this has been posted already but I REALLY did look and couldn't find the same issue(s) addressed anywhere. Similar, but not similar enough, in my opinion, to barge in and switch the subject.
Ok, I have Apache httpd set up so I can use a public_html folder inside of my /home/username directory. Now, I'm about to take a web dev course that teaches JSP/Servlets for building web applications and I'd like to set my environment up so that I can execute .jsps from my web root (/home/username/public_html) just like I would a CGI or PHP script. I have a web host that will give me JSP support for a few extra bucks a month, but I'd rather do it locally... and free.
I have Tomcat installed and running wonderfully. The test page and all the examples work fine and execute immediately. But when I try to execute a .jsp file inside of my web root (/home/username/public_html) I just get the raw Java tags and plain-old HTML rendered in my browser. I pretty much knew that wouldn't work; that'd be way too easy. I just wanted to see what would happen.
I looked through all the tomcat ".conf" files I could find to see if it was similar to setting up httpd inside of my home directory, but I didn't have any luck. It's not a file permissions problem... I've been messing with web "scripts" long enough to check that the files are executable. All of the files needed (borrowed from the examples that come with Tomcat) were in their correct paths inside of my web root, as well. Added :8080 to the end of localhost (like you do to see the Tomcat test page(s) instead of the httpd test page) but that didn't help.
I scoured the web for directions but could only find one solution that was Ubuntu-specific (just install tomcat6-user-something-or-another.deb, which doesn't exist in the Fedora repos), then I looked around here, trying every search term that seemed reasonable to me, and I can't find anything.
I realize I can just write the code and put it in a directory that does allow these things to be executed (var/lib/tomcat6/blah-blah-blah/going-by-memory) and run them from there, but I'd like to be able to just keep all of my web files in the same place; a place where I have full permission to do whatever I want... my home directory public_html.
Is this possible (has to be, right?)? Is this a dumb idea to begin with (I'm prone)? What is the best way to develop JSP/Servlets without having to deal with permissions every time I want to put a new script in a directory outside of my home directory that's already set up to allow the execution of said script?
I'm using Mac OS X's Terminal.app shell to compile and run Fortran programs. One such program resides outside of my home directory (it is in the Applications folder, which resides on my hard drive but seems to be outside of my home folder). How can I navigate into this directory using Terminal.app to run the programs that reside there?
I've updated my password some days back and when I restarted my machine I got error messages stating...
1. Could not update ICEauthority file /home/username/.ICEauthority it gives me only xClose tab and when I click it I get another error message saying...
2. There is a problem with the configuration server.
(/usr/lib/libgconf2-4/gconf-sanity-check-2 exited with status 256) xClose and the last message which i get says that...
3. Nautilus could not create the required folder "/home/username/Desktop".Before running Nautilus, please create the following folder, or set permissions such that Nautilus can create it.
Now every time when I restart my machine I've to follow this procedure...
1. I select my username and then login using xterm.
2. I give command ecryptfs-mount-private and give another password to mount it (it's not taking my regular password)
3. After doing this it takes me back to the login screen and allow me to log in normally...
i just installed the new vision of Ubuntu 11.04 , i created 3 partitions 1 for swap, the other one for / and the last one for /home, but by mistake instead of selecting /home i chose /boot, and i want to change it now, i already tried changing my FSTAB and i ended up with a corrupted Desktop when i restarted. i had to change my FSTAB using VI command here you have a copy of my fstab:
# /etc/fstab: static file system information. # # Use 'blkid -o value -s UUID' to print the universally unique identifier
im trying to properly change the name of my home folder and conf files to make sure my menus and shortcuts work. what happened when i tried was this error msg appears:
"Service '/home/user/.kde3.5/share/apps/kicker/mozilla-firefox.desktop' is malformatted."
then when i try to do anything the menus dissappear. i since redid what i done and it works