Tag: ubuntu
Ubuntu下Subclipse报failed to load javahl library的解决办法
2011-09-01, Nortan Posted in Java, usefulness, OS | 我来说两句 | 查看全文>>
最近买了一T61p,买回后直接安装Ubuntu 10.04,安装Eclipse并安装Subclipse1.6x插件后,使用svn过程中报
Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
/opt/local/lib/libsvnjavahl-1.0.0.0.dylib: no suitable image found. Did find: /opt/local/lib/libsvnjavahl-1.0.0.0.dylib: mach-o, but wrong architecture
原来是缺少一些关联文件,去subclipse的Wiki看了看,说需要安装libsvn-java,在Ubuntu 下安装很简单,命令如下:
sudo apt-get install libsvn-java
安装完后,这文件在/usr/lib/jni目录下,这个目录并不是eclipse的java.library.path路径之一,所以还需要修改eclipse.ini来告诉eclipse去哪找这个libsvn-java相关的文件.
打开eclipse.ini,在最后行加入如下内容(注意换行)
-Djava.library.path=/usr/lib/jni
Add a User on Ubuntu Server Or Debian Server
2011-07-29, Nortan Posted in OS | 我来说两句 | 查看全文>>
Debian (Ubuntu) Server is like any Linux variety, and has full multi-user capabilities, and a common task on any server is adding users. We can use useradd or adduser command to manage users.
1.useradd
The useradd command will let you add a new user easily from the command line:
useradd username
This command adds the user, but without any extra options your user won’t have a password or a home directory.
You can use the -d option to set the home directory for the user. The -m option will force useradd to create the home directory. We’ll try creating a user account with those options, and then use the passwd command to set the password for the account. You can alternatively set a password using -p on the useradd command, but I prefer to set the password using passwd.
sudo useradd -d /home/nortan -m nortan sudo passwd nortan
This will create the user named nortan and give them their own home directory in /home/nortan. The files in the new home directory are copied from the /etc/skel folder, which contains default home directory files. If you wanted to set default values for your users, you would do so by modifying or adding files in that directory. If we take a look at the new home directory for the user:
voland@localhost:~$ls -la /home/nortan total 20 drwxr-xr-x 2 nortan nortan 4096 2006-12-15 11:34 . drwxr-xr-x 5 root root 4096 2006-12-15 11:37 .. -rw-r–r– 1 nortan nortan 220 2006-12-15 11:34 .bash_logout -rw-r–r– 1 nortan nortan 414 2006-12-15 11:34 .bash_profile -rw-r–r– 1 nortan nortan 2227 2006-12-15 11:34 .bashrc
You’ll notice that there are bash scripts in this directory. If you wanted to set default path options for all new users, you would do so by modifying the files in /etc/skel, which would then be used to create these files by the useradd command.
2.adduser
The adduser command is even easier than the useradd command, because it prompts you for each piece of information. I find it slightly funny that there are two virtually identically named commands that do the same thing, but that’s linux for you. Here’s the syntax:
adduser username
Example:
voland@localhost:~$ sudo adduser nortan Password: Adding user `nortan’… Adding new group `nortan’ (1004). Adding new user `nortan’ (1004) with group `nortan’. Creating home directory `/home/nortan’. Copying files from `/etc/skel’ Enter new UNIX password: Retype new UNIX password: No password supplied Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for nortan Enter the new value, or press ENTER for the default Full Name []: The Geek Room Number []: 0 Work Phone []: 555-1312 Home Phone []: 555-1312 Other []: Is the information correct? [y/N] y
How to configure sudo in debian or ubuntu
2010-04-28, Nortan Posted in Configure | 4 回复 | 查看全文>>
Introduction
Sudo is a program designed to allow a sysadmin to give limited root privileges to users and log root activity. The basic philosophy is to give as few privileges as possible but still allow people to get their work done.
Debian’s sudo package has the password timeout set to 15 minutes. This means that when you first enter your password, as long as you don’t wait more than 15 minutes between sudo commands, you won’t have to enter it again. The password timeout can be immediately expired with sudo -k. 查看全文…