Change Long User Name THrough The Terminal

 
Thread Tools Search this Thread
Operating Systems OS X (Apple) Change Long User Name THrough The Terminal
# 1  
Old 02-24-2009
Question Change Long User Name THrough The Terminal

Hello,

I was wondering how to change a user's Long Name through the terminal. I am writing a shell script to change some settings back to the default, and could not find how to do this (or even if you can do this).

I do not want to use applescript.
# 2  
Old 02-24-2009
Here is my script so far:


sudo su
*ADMIN PASSWORD*
##Logs In As Root
passwd student
student
student
##Changes The Password For User "student" to student
rm -rf /Users/student/Desktop/*.*
##Erases Everything Off Desktop
rm -rf /Users/student/Documents/*.*
##Erases Everything Out Of Documents
# 3  
Old 02-24-2009
A coworker of mine found the solution:

Code:
sudo dscl . -change /users/shortname "old long name" "new long name"

Problem Solved.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

How do I change my IP via terminal?

Hi, guys, I was using an online utility to check wheather or not an email existed, and they gave me three tries. I thought clearing temp and cookies would work, but it looks like they grabbed a hold of my IP. :mad: Now, I'd like to make a shell script that changes my IP. Not bad...yet. I'm using... (7 Replies)
Discussion started by: Ihatewindows
7 Replies

2. Ubuntu

Avoid typing long filenames in terminal, shortcut for selecting files?

You probably know the answer to this, because I know it exists. I have super long filenames with md5 hashes and I sucks to type the whole hash in the console. Because... just because :P What is the shortcut for selecting a file in the current directory? Like you get a sort of loop through the... (1 Reply)
Discussion started by: hellfire1
1 Replies

3. Shell Programming and Scripting

Change color on another terminal

i already have a running and working script for remote connection. is there a way to change the terminal color everytime I ssh remotely to another server? this is to avoid confusion since I will be using only one server to remotely access around 50 servers (solaris, linux,. etc) (2 Replies)
Discussion started by: lhareigh890
2 Replies

4. Shell Programming and Scripting

Long and interesting but harmless Terminal script

Hi, I was mucking around with Maven for Eclipse the other day, working on an audio visual project and I was struck by how cool the terminal executing massive amounts of commands is. I have an odd request. I was wondering if people knew of a terminal script that outputed a lot of data,... (0 Replies)
Discussion started by: Red_beardo
0 Replies

5. Solaris

How to change folder color in terminal ?

Hi all, I am really new to UNIX ..and can any1 help me on change the yellow color to blur color (folder) ? Please refer to the attached pictures .. Your help is really appreciated .. :) Have a nice day ! (5 Replies)
Discussion started by: sauronlord
5 Replies

6. Programming

terminal Width/height change

Hi, i am very new to unix/linux programming. for one of the application i have to change the Terminal width and height. i did try this if (ioctl (fd, TIOCGWINSZ, &win)) return; if (y && y >24) win.ws_row = y; else win.ws_row = 24; if (x && x>80)... (2 Replies)
Discussion started by: bgsunny
2 Replies

7. Solaris

How to change the system prompt and BG of terminal?

Hi all, I was wondering how to change the PS1 to my liking? I tried changing it using PS1='my choice' it worked but the subsequent terminals i open will not have it as the default PS1 ,how do i change it? also i am running as super user, and i need to exec bash, to get the bash environment...... (4 Replies)
Discussion started by: wrapster
4 Replies

8. UNIX for Dummies Questions & Answers

How can I change the behavior of the mouse in Terminal?

Hi, I hope I'm posting in the correct forum, so here goes. I would like for the mouse right/left click to work in Terminal (OSX) as it does in Putty. For instance, when I double click 'log' in file.log.gz, only the log part is highlighted (in Terminal), while in Putty the entire file name is... (0 Replies)
Discussion started by: TheChemist
0 Replies

9. Shell Programming and Scripting

Find/Change long text

If I have very large text file *************** *************** *************** *************** *************** ABC-sdfsdf BBB-xk[ptr'; CCC-sdfolb ABC-dltg'fl;l My aim: -> tail last 10 lines from large text. ***** Ok ***** -> Change first 3 charactors which begin with "ABC" to "abc".... (1 Reply)
Discussion started by: aungomarin
1 Replies

10. Solaris

Change Terminal Title

Is it possible to change the title of a Terminal window on Solaris? For example, for a MS Windows command window, one can simply type "title NameofWindow" to change the title for a command window. I was looking for similar functionality for terminal windows. Thanks. (8 Replies)
Discussion started by: here2learn
8 Replies
Login or Register to Ask a Question