Changing User Name Slight Hangup

hi-

Today I switched my linux username and changed to /home/newname. I am doing this because it is not secure to broadcast your username to the world.

At this link:

http://askubuntu.com/questions/34074...ge-my-username

I am wondering if there is a way to do it a little better for me.

Quote:
You can either keep a symlink for backward compatibility, e g ln -s /home/newname /home/oldname or you can change the file contents with sed -i.bak 's/*oldname*/*newname*/g' *list of files* It creates a backup for each file with a .bak extension.
I tried to do a symlink.

It is not working exactly the way I had hoped. I may not understand it.

When I do the command ls -l I had to make an alias command with awk to parse out the user when i display it. That isn't a big deal but I noticed the oldname and newname are in the printout before filtering it with awk.

Also, my old home directory (the one that matches my /home/oldname is not deleted).

I can log in and the desktop looks fine. I indeed have a new /home/newname.

At one point can I delete the /home/oldname.

Is it okay that ls -l is picking up both usernames (new and old) in separate columns?

I wanted to bounce this off a more experienced user to see if there are some minor adjustments I can do to improve not having 2 home directories and if it is okay for ls -l to display both the old and new user name.

thanks!

mtdew3q


Similar Content



Why Vsftp Can Do It, But Openssh Sftp Cannot ? (chroot)

Dear all,

This is long story cut short, with vsftp, if i set this parameters in the vsftp.conf file below

Code:
local_enable=YES
chroot_local_users=YES

I am able to login to the ftp account, see and list my home/user directory, and if i do a cd / or cd .. , i will still be chroot to my /home/user directory.

without, the need to chmod or or chown anything to my /home/user directory

=============================================

With openSSH, internal_sftp, even though I have set the sshd_conf to

Code:
Match user alankoh
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
ChrootDirectory /home/%u

I will need to change owner my /home/user directory to have root becomes it owner.
============================================

Q1) why this difference ? How does vsftp chroot without changing the /home/user folder ownership ?

Q2) i realize that openssh ChrootDirectory parameter causes my default login directory to be set as that of the parameter.
(e.g. if i set to "/whatever/xyz", i will be brought to that /whatever/xyz everytime i login to the sftp instead of my /home/user folder.

Why ? I thought that ChrootDirectory is just a security measure to specify the directory to go to in case the user cd to root (e.g. cd /), else not, i should still go to my /home/user folder everytime i login to sftp.

Regards,
Noob

How To Remove A User?

When i tried to remove a user as well its home directory using this command "userdel -r username" but still its exists on home directory why?

(solved) User Has Not A Directory

Hi. When I ran #useradd -m -s /bin/bash -G áudio,lp,video, wheel,scanner -U user
#passwd user

I forgot to have the /home mounted (shame on me)

so now there is not a /home/user (directory) so user cannot start the X

how can I fix it?

thank you!

Impossible To Get Kubuntu Open On ChromeOS

Hi everyone,

I am currently a user of crouton under chromeOS. It worked "pretty" well for about two months but does not work anymore. When I open it, linux start normally but suddenly stop and give me this message:

Quote:
The following installation problem was detected
while trying to start KDE:

No write access to $HOME directory (/home/paul).

KDE is unable to start.
I already try this Code:
sudo chown -R group:user /home/user

But I can not remember group and user name.

Thanks a lot

/usr/lib/libgconf2-4/gconf-sanity-check-2 Exited With Status 256

Here is the problem:
/usr/lib/libgconf2-4/gconf-sanity-check-2 exited with status 256

Here are all the solutions I founded on the internet (NONE of them work):
rm -rf /var/tmp/rc_host_0
chown -rwx root:root /tmp
chmod 1777 /tmp
chmod 0755 /home
chmod a+rwx /tmp
chown -R root:root /var/lib/gdm
chmod -R 777 /var/lib/gdm
rm -rf /var/lib/gdm3/.*
rm -rf /var/lib/gdm/.*
rm -rf /Home Dir/UserName/.gcon*
rm -rf /Home Dir/UserName/.gnom*
rm -rf /Home Dir/UserName/.cache
rm -rf /Home Dir/UserName/.person*
touch /Home Dir/UserName/.personal.login
cat /etc/gconf/gconf.xml.system
mkdir -p /usr/local/etc/gconf/gconf.xml.default
chmod 775 /etc/gconf/gconf.xml.system

Here is my system information:
Linux Kernel v2.6.32-504.12.2.el6.x86_64
CentOS 6.6
GNOME 2.28.2

I have been searching for an answer all week and found NONE.
Somebody, Anybody please help!!!

The only solution I found that works is deleting all the .files, but there's got to be a better way.

Why ./home/Desktop Is Incorrect And ./Desktop Is Correct?

I'm learning about Linux, started yesterday. I have a question which didn't clear from the book and Google. The question is what is the difference between ./ and / in terminal? I'm asking this because when i give command for example - ./home/yogesh/Desktop/Books it is showing bash: ./home/yogesh/Desktop : No such file or directory but on removing the dot it's showing /home/yogesh/Desktop/Books: Is a directory.
Again on giving command like /Desktop it showing /Desktop :No such file or directory but on adding dot before / it is giving ./Desktop: is a directory.
What is the difference between ./ and / ?
I'm sorry if i asked something foolish but I have to know it anyway. Thankyou in advance and sorry for my bad English.

Usr/bin

given that im in the home directory, what cli command should i typoe to get access to my documents folder which i can clearly see in the gui but cannot seem to access.

i thought logically it should be /home/files/documents or perhaps /home/user/files/documents

where am i being a dweeb!!!!!....... again

Simlink Not Working

I have a user: mim that has within it a folder /mimmim and within that, a folder called
/Src. user: mim has root privileges.

There is an Install file in /home/mim/ that uses a file in /Src called pgp.h. pgp.h references a file /openssl/opensslv.h. The opensslv.h is actually in the newer openssl installations he /usr/local/ssl/include/openssl/

I tried to do a 'sudo ln -s /usr/local/ssl/include/openssl openssl' from /home/mim/, as well as from within the /home/mim/mimmim/ and from within /home/mim/mimmim/Src/. I still get this error however:

pgp.h:16:30: fatal error: openssl/opensslv.h: No such file or directory
compilation terminated.

I guess I am not sim linking correctly.

Unable To Login On Runlevel 3 In Fedora 21 Xfce After Moving/restoring Usr Dir

I'm not a total linux newbie, but I figure this is a newbie mistake, so here it is.

I'm running fedora 21 xfce on a triple boot system (using grub to select the os), so if it's at all possible to avoid a reinstall that would be very awesome.
What happened:
I ran out of space on my root partition (lvm). Tried to figure out how to resize the root partition while tired, gave up, decided to move /usr to my home partition and create a symlink. Copied /usr to /home/usr, deleted /usr. Unable to create the symlink now (duh! as I said, I was tired), booted into liveusb disk to create the symlink. Couldn't boot after that and gave up for the night. This morning I was clear enough to figure out resizing the partitions, so I did and then copied /home/usr back to /usr. Rebooted and everything seems normal until I want to login. Logging in just dumps me back at the login screen, wether I use root, user runlevel 5 or runlevel 3, no matter. In runlevel 3 there might be an error message but it flashes by so quickly I can't read it. Authentication does proceed, because logging in with a wrong username or password gives the proper error.
Google has not provided me with any useful hints, so I'm at a loss. Can someone please help me out?

Many thanks,

Willem

Exporting Log Data To A File That Matches Stdout

hey guys,

Let's say I want to find out which log files have related ntp information in them. I use cat and grep to search through the files in /var/log and then export that to a file. this is the command...

# cat /var/log/* | grep ntp > /home/log.txt

The file created from this command will not include the directories the log entries are apart of. Why not? For example, if you do this same command without exporting to the /home/log.txt file it will show you in stdout which directory each log entry is in. Hope I'm making sense here. My question is, is there a clever way to export to a file in a way so that the file created is structured exactly like the stdout of the command below?

# cat /var/log/* | grep ntp